Browse Source

iassign_tinymce plugin

Lucas de Souza 6 năm trước cách đây
commit
71c68e6056

+ 69 - 0
README

@@ -0,0 +1,69 @@
+iAssign version 2.1.70
+------------------------
+
+By iMatica/iMath - free interactive tools for teaching-learning Math
+   Patricia Rodrigues <patricnet@ig.com.br>, Leônidas O. Brandão <leo@ime.usp.br>
+
+
+.: About iAssign :.
+
+This is the iAssign (Interactive Assignment) package, an iMath free system to enrich activities in Moodle. 
+It is created by Patricia Rodrigues and Leônidas de Oliveira Brandão.
+
+iAssign's goal is to increase interactivity in activities related to specific subjects (such as Geometry, Functions, Programming,...)
+in a flexible way. 
+
+In order to improve interactivity, iAssign makes use of iLM (interactive Learning Module),
+that is any interactive tool that runs under a Web browser.
+Typically an iLM is a Java applet with a few (mandatory) communication methods, all based on HTTP protocol.
+This implies that any applet can easily became an iLM and can be integrated to Moodle under iAssign package. 
+
+If the iLM offers automatic assessment functionality, iAssign is able
+to deal with it. Under such iLM, iAssign provides immediate feedback to
+the student, and the teachers can get instant information about their
+activities (including reports about the student performance).
+
+It can be added new iLM into iAssign, at any time, but (for security
+reason), only the administrator has the privilege of integrating new iLM into iAssign.
+Once integrated, an iLM can be used by anyone registered in its Moodle.
+For instance, an user with privileges of "teacher" is allowed to use
+the iAssign authoring tools to create activities with any iLM
+(like iGeom, iGraf, or iVprog, respectively to related to the subjects, Geometry, Functions and Programming).
+
+The main features of iAssign package are:
+ - The authoring tool to allow any teacher to easily prepare activities to students. Activities can be:
+   + an exercise (the student must send an answer, and if the iLM has automatic assessment, its results (right/wrong) is also registered);
+   + a test (the student does the activity, if iLM has automatic assessment, the student gets immediate feedback, but no data is recorded in Moodle's database);
+   + an example (the student can interact with the example, but nothing is recorded).
+ - Reports about students activities: 
+   + teachers can see, e.g., a survey or statistics about student's answers and can have quick access to any submited answer;
+   + the students have a survey of their activities (including their grades)
+ - Integration with general Moodle grades
+ - A filter that allows the insertion of iLM content into any (asynchronous) Moodle text.
+
+Besides, as the majority of Moodle modules, iAssign can export (as backup) one activity or a complete lesson (a set of activities).
+
+Note: This plugin is part of iAssign SET see more in https://moodle.org/plugins/browse.php?list=set&id=54
+
+.: Quick install instructions (to be used by the system administrator) :.
+
+0) Be sure you have (at least) Moodle 2.4 until Moodle 2.6 installed
+1) Be sure to have the latest language package, such as English (en), Portuguese (pt_br).
+2) Be sure to have the latest version of the module iAssign (see in https://github.com/leonidasbrandao/iAssign master)
+3) Unpack 'iAssign.2.1.x.zip' (or 'iAssign.2.1.x.tgz')
+4) Copy the 'iassign' tinymce directory into the "lib/editor/tinymce/plugins" subdirectory of Moodle installation
+5) Under role "administrator", go to the 'Site administration' and click on 'Notifications'
+6) Have fun.
+
+See more documentation in http://docs.moodle.org/en/Insert_interactive_activity_(iAssign)_by_TinyMCE_editor
+
+Comments and suggestions are always welcome at http://www.matematica.br/iassign or https://github.com/leonidasbrandao/iAssign.
+(if the comment area is missing, please send us an email).
+
+
+Best regards,
+
+Leônidas <leo@ime.usp.br> and Patricia <patricnet@ig.com.br>
+
+Institute of Mathematics and Statistics - University of São Paulo
+iMath/LInE : http://www.matematica.br : http://line.ime.usp.br

+ 9 - 0
lang/en/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 13 - 0
lang/en/tinymce_iassign.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Strings for 'iassign' plugin.
+ * 
+ * @author Luciano Oliveira Borges
+ * @package   tinymce_iassign_lang
+ * @copyright 2013 iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+$string['pluginname'] = 'Insert interactive activity (iAssign) by TinyMCE editor';
+/* All lang strings used from TinyMCE JavaScript code must be named 'pluginname:stringname', no need to create langs/en_dlg.js */
+$string['iassign:desc'] = 'Insert interactive activity (iAssign)';

+ 9 - 0
lang/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 9 - 0
lang/pt_br/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 13 - 0
lang/pt_br/tinymce_iassign.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Strings for 'iassign' plugin.
+ *
+ * @author Luciano Oliveira Borges
+ * @package   tinymce_iassign_lang
+ * @copyright 2013 iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+$string['pluginname'] = 'Insere uma atividade interativa (iTarefa) pelo editor TinyMCE';
+/* All lang strings used from TinyMCE JavaScript code must be named 'pluginname:stringname', no need to create langs/en_dlg.js */
+$string['iassign:desc'] = 'Insere uma atividade interativa (iTarefa)';

+ 30 - 0
lib.php

@@ -0,0 +1,30 @@
+<?php
+
+defined('MOODLE_INTERNAL') || die();
+
+/**
+ * Plugin for Moodle insert 'iassign' button.
+ *
+ * @author Luciano Oliveira Borges
+ * @package   tinymce_iassign_lib
+ * @copyright 2013 iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class tinymce_iassign extends editor_tinymce_plugin {
+    /** @var array list of buttons defined by this plugin */
+    protected $buttons = array('iassign');
+
+    protected function update_init_params(array &$params, context $context,
+            array $options = null) {
+		global $CFG, $COURSE;
+
+        // Add button after 'table' in advancedbuttons3.
+        $this->add_button_after($params, 3, 'iassign', 'table');
+
+        // Add JS file, which uses default name.
+        $this->add_js_plugin($params);
+		
+		$params['iassign_course'] = $COURSE->id;
+		$params['iassign_wwwroot'] = $CFG->wwwroot."/mod/iassign/ilm_manager.php";
+    }
+}

BIN
pix/icon.gif


+ 9 - 0
pix/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 61 - 0
tinymce/editor_plugin.js

@@ -0,0 +1,61 @@
+/**
+ * @author Luciano Oliveira Borges
+ */
+
+(function() {
+
+    tinymce.create('tinymce.plugins.iassignPlugin', {
+        /**
+         * Initializes the plugin, this will be executed after the plugin has been created.
+         * This call is done before the editor instance has finished it's initialization so use the onInit event
+         * of the editor instance to intercept that event.
+         *
+         * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+         * @param {string} url Absolute URL to where the plugin is located.
+         */
+        init : function(ed, url) {
+            // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceiAssign');
+            ed.addCommand('mceiAssign', function() {
+				
+				open_ilm_manager = window.open(ed.getParam("iassign_wwwroot")+'?id='+ed.getParam("iassign_course")+'&from=tinymce','','width=1000,height=880,menubar=0,location=0,scrollbars,status,fullscreen,resizable');
+
+            });
+            ed.addCommand('mceiAssignReturn', function(tag_filter) {
+            	
+            	ed.selection.setContent(tag_filter);
+
+            });
+            ed.addCommand('mceiAssignClean', function() {
+            	
+            	ed.selection.setContent(tag_filter);
+
+            });
+            // Register iassign button
+            ed.addButton('iassign', {
+                title : 'iassign.desc',
+                cmd : 'mceiAssign',
+                image : url + '/img/iassign.gif'
+            });
+
+        },
+
+        /**
+         * Returns information about the plugin as a name/value array.
+         * The current keys are longname, author, authorurl, infourl and version.
+         *
+         * @return {Object} Name/value array containing information about the plugin.
+         */
+        getInfo : function() {
+            return {
+                longname : 'iAssign plugin',
+                author : 'Luciano Oliveira Borges',
+                authorurl : 'http://www.matematica.br/tinymce_iassign',
+                infourl : 'http://docs.moodle.org/en/TinyMCE',
+                version : "1.25"
+            };
+        }
+    });
+
+    // Register plugin.
+    tinymce.PluginManager.add('iassign', tinymce.plugins.iassignPlugin);
+})();

BIN
tinymce/img/iassign.gif


+ 9 - 0
tinymce/img/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 9 - 0
tinymce/index.html

@@ -0,0 +1,9 @@
+<html>
+	<head>
+		<title>Acess not allowed! - Acesso não permitido</title>
+	</head>
+	<body style="color: #FF0000">
+		<p>Acesso não permitido!</p>
+		<p>Acess not allowed!</p>
+	</body>
+</html>

+ 78 - 0
version.php

@@ -0,0 +1,78 @@
+<?php
+/**
+ * @mainpage
+ * This is the iAssign (Interactive Assignment) package, an iMath free system to enrich activities in Moodle.
+ * It is created by Patricia Rodrigues and Leônidas de Oliveira Brandão.
+ *
+ * iAssign's goal is to increase interactivity in activities related to specific subjects (such as Geometry, Functions, Programming,...)
+ * in a flexible way.
+ *
+ * In order to improve interactivity, iAssign makes use of iLM (interactive Learning Module),
+ * that is any interactive tool that runs under a Web browser.
+ * Typically an iLM is a Java applet with a few (mandatory) communication methods, all based on HTTP protocol.
+ * This implies that any applet can easily became an iLM and can be integrated to Moodle under iAssign package.
+ *
+ * If the iLM offers automatic assessment functionality, iAssign is able
+ * to deal with it. Under such iLM, iAssign provides immediate feedback to
+ * the student, and the teachers can get instant information about their
+ * activities (including reports about the student performance).
+ *
+ * It can be added new iLM into iAssign, at any time, but (for security
+ * reason), only the administrator has the privilege of integrating new iLM into iAssign.
+ * Once integrated, an iLM can be used by anyone registered in its Moodle.
+ * For instance, an user with privileges of "teacher" is allowed to use
+ * the iAssign authoring tools to create activities with any iLM
+ * (like iGeom, iGraf, or iVprog, respectively to related to the subjects, Geometry, Functions and Programming).
+ *
+ * The main features of iAssign package are:
+ * - The authoring tool to allow any teacher to easily prepare activities to students. Activities can be:
+ *    + an exercise (the student must send an answer, and if the iLM has automatic assessment, its results (right/wrong) is also registered);
+ *    + a test (the student does the activity, if iLM has automatic assessment, the student gets immediate feedback, but no data is recorded in Moodle's database);
+ *    + an example (the student can interact with the example, but nothing is recorded).
+ *  - Reports about students activities:
+ *    + teachers can see, e.g., a survey or statistics about student's answers and can have quick access to any submited answer;
+ *    + the students have a survey of their activities (including their grades)
+ *  - Integration with general Moodle grades
+ *  - A filter that allows the insertion of iLM content into any (asynchronous) Moodle text.
+ *
+ * @author Patricia Alves Rodrigues <<patricnet@ig.com.br>>
+ * @author Leônidas O. Brandão  <<leo@ime.usp.br>>
+ *
+ * <b>Contributors</b>
+ *  - Marcelo de Arce Alemany <<marcelo.alemany@gmail.com>>
+ *  	+ Translation into Spanish.
+ *  - Danilo Leite Dalmon <<leite.danilo@gmail.com>>
+ *  	+ Translation into French.
+ *  - Luciano Oliveira Borges <<luciano.oborges@usp.br>>
+ *  	+ Refactoring code documentation.
+ *  	+ Filter files in view of select iLM files (Block and Module).
+ *  	+ Changes for implement iLM version.
+ *  	+ Change file for Moodle filesystem (MoodleData).
+ *
+ * @version v 2.1.16 2013/10/25
+ * @since 2010/09/27
+ * @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ *
+ * <b>License</b>
+ *  - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ *
+ *  <br><br><a href="../index.html"><b>Return to iAssign Documentation</b></a>
+ */
+/**
+ * TinyMCE iAssign plugin version details.
+ * 
+ * @author Luciano Oliveira Borges
+ * @package   tinymce_iassign
+ * @copyright 2013 iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+// The current plugin version (Date: YYYYMMDDXX).
+$plugin->component = 'tinymce_iassign';
+$plugin->release = '2.1.87 (Build: 2014070100)';	// Human-readable version name
+$plugin->version   = 2014070100; // Required Moodle version.
+$plugin->requires  = 2012112900; // Full name of the plugin (used for diagnostics).
+$plugin->maturity = MATURITY_STABLE;	// How stable the plugin is: MATURITY_ALPHA, MATURITY_BETA, MATURITY_RC, MATURITY_STABLE (Moodle 2.0 and above)
+$plugin->dependencies = array('mod_iassign' => 2014012100);