Browse Source

Merged functionalities

Igor 4 years ago
parent
commit
c0782a4cb0

+ 1 - 0
backup/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 1 - 0
backup/moodle2/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 26 - 6
classes/event/course_module_instance_list_viewed.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission created event.
  *
@@ -18,14 +33,19 @@ defined('MOODLE_INTERNAL') || die();
 
 class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed {
 
-  /// Create the event from course record.
-  //  @param \stdClass $course
-  //  @return course_module_instance_list_viewed
+  /**
+   * Create the event from course record.
+   *
+   * @param \stdClass $course
+   * @return course_module_instance_list_viewed
+   */
   public static function create_from_course (\stdClass $course) {
-    $params = array('context' => \context_course::instance($course->id));
+    $params = array(
+      'context' => \context_course::instance($course->id)
+    );
     $event = \mod_iassign\event\course_module_instance_list_viewed::create($params);
     $event->add_record_snapshot('course', $course);
     return $event;
-    }
-
   }
+
+}

+ 56 - 21
classes/event/course_module_viewed.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign course module viewed event.
  *
@@ -18,47 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class course_module_viewed extends \core\event\course_module_viewed {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'r'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING;
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventcoursemoduleviewed', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has viewed the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
-    return array($this->courseid, 'iassign', 'view', "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+    return array($this->courseid, 'iassign', 'view',
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
+
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
     if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 56 - 22
classes/event/iassign_created.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign created event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class iassign_created extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'c'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_TEACHING;
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventiassigncreated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has created the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'add',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 56 - 22
classes/event/iassign_deleted.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign deleted event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class iassign_deleted extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'd'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_TEACHING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventiassigndeleted', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has deleted the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'delete iassign',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 56 - 22
classes/event/iassign_updated.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign updated event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class iassign_updated extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'u'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_TEACHING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventiassignupdated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has updated the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'update',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 1 - 0
classes/event/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 56 - 22
classes/event/submission_comment_created.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission comment created event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class submission_comment_created extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'c'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventsubmissioncommentcreated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has created submission of comment updated the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'add comment',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 56 - 22
classes/event/submission_comment_updated.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission comment update event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class submission_comment_updated extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'u'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventsubmissioncommentupdated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has viewed  activity submission of comment updated the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'update comment',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 55 - 21
classes/event/submission_created.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission created event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class submission_created extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'c'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventsubmissioncreated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has created submission the iAssign with id '$this->objectid' in " .
-            "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'add submission',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
     if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 56 - 22
classes/event/submission_updated.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission updated event.
  *
@@ -18,48 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class submission_updated extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'u'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventsubmissionupdated', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has update submission the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
+
     return array($this->courseid, 'iassign', 'update submission',
-      "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 57 - 22
classes/event/submission_viewed.php

@@ -1,5 +1,20 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * The mod_iassign submission viewed event.
  *
@@ -18,47 +33,67 @@ defined('MOODLE_INTERNAL') || die();
 
 class submission_viewed extends \core\event\base {
 
-  /// Init method.
+  /**
+   * Init method.
+   */
   protected function init () {
     $this->data['crud'] = 'r'; // c(reate), r(ead), u(pdate), d(elete)
     $this->data['edulevel'] = self::LEVEL_PARTICIPATING; // LEVEL_TEACHING , LEVEL_PARTICIPATING, LEVEL_OTHER
     $this->data['objecttable'] = 'iassign';
-    }
+  }
 
-  /// Returns localised general event name.
-  //  @return string
+  /**
+   * Returns localised general event name.
+   *
+   * @return string
+   */
   public static function get_name () {
     return get_string('eventsubmissionviewed', 'mod_iassign');
-    }
+  }
 
-  /// Returns non-localised event description with id's for admin use only.
-  //  @return string
+  /**
+   * Returns non-localised event description with id's for admin use only.
+   *
+   * @return string
+   */
   public function get_description () {
     return "The user with id '$this->userid' has viewed  activity submission the iAssign with id '$this->objectid' in " .
-           "the iAssign activity with course module id '$this->contextinstanceid'.";
-    }
+        "the iAssign activity with course module id '$this->contextinstanceid'.";
+  }
 
-  /// Get URL related to the action.
-  //  @return \moodle_url
+  /**
+   * Get URL related to the action.
+   *
+   * @return \moodle_url
+   */
   public function get_url () {
     return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
-    }
+  }
 
-  /// Return the legacy event log data.
-  //  @return array|null
+  /**
+   * Return the legacy event log data.
+   *
+   * @return array|null
+   */
   public function get_legacy_logdata () {
-    return array($this->courseid, 'iassign', 'view submission', "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
-    }
 
-  /// Custom validation.
-  //  @throws \coding_exception
-  //  @return void
+    return array($this->courseid, 'iassign', 'view submission',
+      "view.php?id={$this->contextinstanceid}",
+      $this->objectid, $this->contextinstanceid);
+  }
+
+  /**
+   * Custom validation.
+   *
+   * @throws \coding_exception
+   * @return void
+   */
   protected function validate_data () {
     parent::validate_data();
     // Make sure this class is never used without proper object details.
-    if (!$this->contextlevel === CONTEXT_MODULE) {
+    if(!$this->contextlevel === CONTEXT_MODULE) {
       throw new \coding_exception('Context level must be CONTEXT_MODULE.');
-      }
     }
-
   }
+
+}

+ 1 - 0
classes/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 1 - 0
db/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 5 - 5
db/install.php

@@ -34,18 +34,18 @@ function xmldb_iassign_install() {
   $records = array(		   
     // iLM in HTML/CSS/JavaScript format
     //
-    // iVProgH 0.1.1 - HTML5
+    // iVProg4 1.0.20190717 - HTML5 - 2019
     array_combine(
      array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'), 
-     array('iVProgH', 'http://www.matematica.br/ivprogh', '0.1.20190307', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProgH/0.1.20190307/ivprog-html/', 'index.html', 800, 600, 1, time(), $USER->id, time(), 1)),
-    // iVProgH5 0.0.2 - HTML5 (version used in 2014)
+     array('iVProg4', 'http://www.usp.br/line/ivprog/', '1.0.20190717', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProg4/1.0.20190717/ivprog4/', 'index.html', 800, 600, 1, time(), $USER->id, time(), 1)),
+    // iVProgH 0.0.2 - HTML5 - 2014
     array_combine(
      array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'), 
-     array('iVProgH', 'http://www.matematica.br/ivprogh', '0.0.2', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProgH5/0.0.2/ivprog-html/', 'main.html', 800, 600, 1, time(), $USER->id, time(), 1)),
+     array('iVProgH', 'http://www.matematica.br/ivprogh', '0.0.2', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProgH/0.0.2/ivprogh/', 'main.html', 800, 600, 1, time(), $USER->id, time(), 1)),
     // fractions 0.1.2017.11.22 - HTML5
     array_combine(
      array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'),
-     array('iFractions', 'http://www.matematica.br/ifractions', '0.1.2017.11.22', 'HTML5', '{"en":"Interactive Fractions game","pt_br":"Jogo interativa de frações"}', 'frc', 'ilm/iFractions/0.1.2017.11.22/ifractions/', 'index.html', 1000, 600, 1, time(), $USER->id, time(), 1))
+     array('iFractions', 'http://www.matematica.br/ifractions', '0.1.2017.11.22', 'HTML5', '{"en":"Interactive Fractions game","pt_br":"Jogo interativa de frações"}', 'frc', 'ilm/iFractions/0.1.2017.11.22/ifractions/', 'index.html', 1000, 600, 1, time(), $USER->id, time(), 1)),
 
     // iLM in Java/JAR format
     //

+ 1 - 1
db/install.xml

@@ -52,7 +52,7 @@
                 <FIELD NAME="intro" 			TYPE="text" 				NOTNULL="false"					 				SEQUENCE="false" COMMENT="The description of the assignment. This field is used by feature MOD_INTRO."   						PREVIOUS="name" 			NEXT="introformat"/>
                 <FIELD NAME="introformat" 		TYPE="int" 	LENGTH="4" 		NOTNULL="true" 					 DEFAULT="0" 	SEQUENCE="false" COMMENT="The format of the description field of the assignment. This field is used by feature MOD_INTRO."		PREVIOUS="intro" 			NEXT="activity_group"/>
                 <FIELD NAME="activity_group" 	TYPE="int"  LENGTH="1"   	NOTNULL="true" 	UNSIGNED="true"  DEFAULT="1" 	SEQUENCE="false" ENUM="false" COMMENT="Type grouping. 0-do not group / 1-group by type of activity" 	  						PREVIOUS="introformat"   	NEXT="grade"/>
-                <FIELD NAME="grade"             TYPE="int"  LENGTH="11"     NOTNULL="true"  UNSIGNED="false" DEFAULT="0" 	SEQUENCE="false" ENUM="false" COMMENT="Maximum score for activity"                                       						PREVIOUS="activity_group"	NEXT="timeavailable"/>
+                <FIELD NAME="grade"             TYPE="float"                NOTNULL="true"  UNSIGNED="false" DEFAULT="0" 	SEQUENCE="false" ENUM="false" COMMENT="Maximum score for activity"                                       						PREVIOUS="activity_group"	NEXT="timeavailable"/>
                 <FIELD NAME="timeavailable"     TYPE="int"  LENGTH="10"     NOTNULL="true"  UNSIGNED="true"  DEFAULT="0" 	SEQUENCE="false" ENUM="false" COMMENT="Date of opening activity"                                         						PREVIOUS="grade"          	NEXT="timedue"/>
                 <FIELD NAME="timedue"           TYPE="int"  LENGTH="10"     NOTNULL="true"  UNSIGNED="true"  DEFAULT="0" 	SEQUENCE="false" ENUM="false" COMMENT="Closing date of the activity"                                     						PREVIOUS="timeavailable"  	NEXT="preventlate"/>
                 <FIELD NAME="preventlate"       TYPE="int"  LENGTH="2"      NOTNULL="false" UNSIGNED="true"  DEFAULT="1" 	SEQUENCE="false" ENUM="false" COMMENT="Allow sending late? 0 - no / 1 - yes"                             						PREVIOUS="timedue"        	NEXT="test"/>

+ 7 - 3
db/upgrade.php

@@ -302,11 +302,15 @@ function xmldb_iassign_upgrade ($oldversion) {
       array_combine(
         array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'),
         array('Risko', 'http://risko.pcc.usp.br/', '2.2.23', 'Java', '{"en":"Technical drawing with triangle and ruler","pt_br":"Desenho Geomẽtrico com esquadro"}', 'rsk', 'ilm/Risko/2.2.23/Risko.jar', 'RiskoApplet.class', 800, 600, 1, time(), $USER->id, time(), 0)),
-      // iVProgH5 0.1.1 - HTML5
+      // iVProg4 1.0.20190717 - HTML5 - 2019
       array_combine(
         array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'), 
-        array('iVProgH', 'http://www.matematica.br/ivprogh', '0.1.20190307', 'HTML5', '{"en":"Visual Interactive Programming on the Internet HTML5","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProgH/0.1.20190307/ivprog-html/', 'index.html', 800, 600, 1, time(), $USER->id, time(), 1)),
-      // fractions 0.1.2017.11.22 - HTML5
+        array('iVProg4', 'http://www.usp.br/line/ivprog/', '1.0.20190717', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProg4/1.0.20190717/ivprog4/', 'index.html', 800, 600, 1, time(), $USER->id, time(), 1)),
+      // iVProgH 0.0.2 - HTML5 - 2014
+      array_combine(
+        array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'), 
+        array('iVProgH', 'http://www.matematica.br/ivprogh', '0.0.2', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}', 'ivph', 'ilm/iVProgH/0.0.2/ivprogh/', 'main.html', 800, 600, 1, time(), $USER->id, time(), 1)),   
+        // fractions 0.1.2017.11.22 - HTML5
       array_combine(
         array('name', 'url', 'version', 'type', 'description', 'extension', 'file_jar', 'file_class', 'width', 'height', 'enable', 'timemodified', 'author', 'timecreated', 'evaluate'), 
         array('iFractions', 'http://www.matematica.br/ifractions', '0.1.2017.11.22', 'HTML5', '{"en":"Interactive Fractions game","pt_br":"Jogo interativa de frações"}', 'frc', 'ilm/iFractions/0.1.2017.11.22/ifractions/', 'index.html', 1000, 600, 1, time(), $USER->id, time(), 1))

+ 12 - 20
iassign_form.php

@@ -286,26 +286,18 @@ class mod_iassign_form extends moodleform {
     //D Interactive Learning Modules: num_iLM_html=0, num_iLM_java=9
 
     //TODO Assim o '/lib/formslib.php : get_data()' destroi o campo 'iassign_ilmid'...
-    $html_sel = "\n        <select class=\"custom-select\" name=\"iassign_ilmid\" id=\"id_iassign_ilmid\" onChange=\"config_ilm(this.value);\">\n";
-    $html_sel .= "        <optgroup label=\"Group HTML\">\n";
-    if ($num_iLM_html>0)
-      $html_sel .= "          <option selected value=\"" . $list_html_id[0] . "\">" . $list_html[0] . "</option>\n";
-    else echo "iassign_form.php: ERRO, num_iLM_html=$num_iLM_html<br/>\n";
-    for ($ii=1; $ii<$num_iLM_html; $ii++)
-      $html_sel .= "          <option value=\"" . $list_html_id[$ii] . "\">" . $list_html[$ii] . "</option>\n";
-    $html_sel .= "        </optgroup>\n        <optgroup label=\"Group Java\">\n";
-    for ($ii=0; $ii<$num_iLM_java; $ii++)
-      $html_sel .= "          <option value=\"" . $list_applets_id[$ii] . "\">" . $list_applets[$ii] . "</option>\n";
-    $html_sel .= "        </optgroup>\n";
-    $html_sel .= "        </select>\n";
-
-    // choose_file = 'Choose the file with the iLM activity' / choose_iLM = 'Choose the interactive Learning Module (iLM)'
-    $mform->addElement('html', get_string('choose_iLM', 'iassign'));//, 'iassign_ilmid');//, $html_sel, array('onChange' => 'config_ilm(this.value);'));
-    $html_sel .= $OUTPUT->help_icon('choose_iLM', 'iassign'); // choose_iLM_help
-    $html_sel .= "     <div class=\"form-control-feedback invalid-feedback\" id=\"id_error_iassign_ilmid\" ></div>\n";
-
-    $mform->addElement('html', $html_sel); //, 'iassign_ilmid');
-    $mform->setDefault('iassign_ilmid', 0);
+    $html_group = get_string("group", "iassign") . " HTML";
+    $java_group = get_string("group", "iassign") . " Java";
+    $groups_ilm_select = array($html_group => array(), $java_group => array());
+    for ($ii=0; $ii<$num_iLM_html; $ii++) {
+      $groups_ilm_select[$html_group][$list_html_id[$ii]] = $list_html[$ii];
+    }
+    for ($ii=0; $ii<$num_iLM_java; $ii++) {
+      $groups_ilm_select[$java_group][$list_applets_id[$ii]] = $list_applets[$ii];
+    }
+    
+    $mform->addElement('selectgroups', 'iassign_ilmid', get_string('choose_iLM', 'iassign'), $groups_ilm_select);
+    $mform->addHelpButton('iassign_ilmid', 'choose_iLM', 'iassign');
 
     //TODO Adaptives to use API of MoodleForm
     // addOption($optgroup, $text, $value, $attributes=null)

+ 1 - 0
icon/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

BIN
icon/maximize.png


+ 10 - 0
ilm_debug/index.html

@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <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>

+ 28 - 0
ilm_handlers/html5.php

@@ -75,6 +75,7 @@ class html5 implements ilm_handle {
       if (!empty($file_url)) { // There is an iLM file
         //TODO iLM_HTML5 :: Change to 'object', tag 'applet' was deprecated.
         $paramsStr = "?1=1";
+        $html .= html5::show_ilm_commands();
 
         switch ($options['type']) {
           case "view":
@@ -142,6 +143,33 @@ class html5 implements ilm_handle {
     return $html;
     } // public static function build_ilm_tags($ilm_id, $options = array())
 
+  public static function show_ilm_commands() {
+    $html = "<script>function full_screen() {
+  if('fullscreenEnabled' in document || 'webkitFullscreenEnabled' in document || 'mozFullScreenEnabled' in document || 'msFullscreenEnabled' in document) {
+    if(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) {
+      var element = document.getElementsByName('iLM').item(0);
+      //requestFullscreen is used to display an element in full screen mode.
+      if('requestFullscreen' in element) {
+        element.requestFullscreen();
+      } 
+      else if ('webkitRequestFullscreen' in element) {
+        element.webkitRequestFullscreen();
+      } 
+      else if ('mozRequestFullScreen' in element) {
+        element.mozRequestFullScreen();
+      } 
+      else if ('msRequestFullscreen' in element) {
+        element.msRequestFullscreen();
+      }
+    }
+  } else {
+    $('.expand_button').addClass('disabled');
+  }
+}</script>";
+    $html .= "<div style='width: 800px;text-align: right;'><div onClick='full_screen()' style='color: blue; cursor: pointer;'>".get_string('full_screen', 'iassign')."</div></div>";
+
+    return $html;
+  }
 
   /// Exibe a atividade no iLM
   //  @calledby locallib.php : view_iLM(...)

+ 10 - 0
ilm_handlers/index.html

@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <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>

+ 3 - 0
lang/en/iassign.php

@@ -41,6 +41,7 @@ $string['author_id_modified']             = 'Last modified by:';
 $string['auto_evaluate']                  = 'It has automatic evaluator?';
 $string['auto_evaluate_help']             = 'What means automatic evaluation? It depends on the iLM implementation. '.
         'If the iLM has automatic evaluation select Yes to use its automatic evaluation to the activity.';
+$string['auto_evaluate_reprocess']        = 'Reevaluate automatically';
 $string['auto_result']                    = 'Result of automatic evaluation:';
 $string['automatic_evaluate']             = 'It must be used automatic evaluation in this activity?';
 $string['availabledate']                  = 'Available from';
@@ -245,6 +246,7 @@ $string['filejarnotfound']                = 'File JAR not found. Notify the admi
 $string['filenotfound']                   = 'File not found in the activity. Notify the teacher';
 $string['files_course']                   = 'Files of interactive activities';
 $string['files_jar_ilm']                  = 'List file (s) JAR of iLM';
+$string['full_screen']                    = 'Full screen';
 $string['functions']                      = 'Functions';
 $string['general']                        = 'General';
 $string['general_fields']                 = 'Common settings to the interactive activities';
@@ -261,6 +263,7 @@ $string['grade_max']                      = 'Maximum score';
 $string['grade_student']                  = 'Grade student';
 $string['grades']                         = 'Archive of reviews';
 $string['graphic']                        = 'Graphics';
+$string['group']                          = 'Group';
 $string['hbar_blue']                      = '';
 $string['hbar_blue_r']                    = '';
 $string['hbar_green']                     = '';

+ 1 - 0
lang/en/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 3 - 0
lang/es/iassign.php

@@ -42,6 +42,7 @@ $string['author_id_modified']             = 'Último cambio realizado por:';
 $string['auto_evaluate']                  = 'Tiene evaluador automático?';
 $string['auto_evaluate_help']             = '¿Qué significa evaluación automática? Depende de la implementación del iMA. '.
         'Si el iMA tiene una evaluación automática, seleccione Sí para usar una actividad con evaluación automática.';
+$string['auto_evaluate_reprocess']        = 'Reevaluar automáticamente';
 $string['auto_result']                    = 'Resultado de la evaluación automática:';
 $string['automatic_evaluate']             = 'Usar evaluación automática en la tarea?';
 $string['availabledate']                  = 'Disponible a partir del';
@@ -246,6 +247,7 @@ $string['filejarnotfound']                = 'Archivo JAR não encontrado. Inform
 $string['filenotfound']                   = 'Fichero de la actividad no fue encontrado. Comunique al professor.';
 $string['files_course']                   = 'Archivos das actividades interativas';
 $string['files_jar_ilm']                  = 'Relação de archivo(s) JAR do iMA';
+$string['full_screen']                    = 'Pantalla completa';
 $string['functions']                      = 'Funções';
 $string['general']                        = 'General';
 $string['general_fields']                 = 'Ajustes comunes a las actividades interactivas';
@@ -262,6 +264,7 @@ $string['grade_max']                      = 'Nota máxima';
 $string['grade_student']                  = 'Nota del alumno';
 $string['grades']                         = 'Trayectoria de las evaluaciones';
 $string['graphic']                        = 'Gráficos';
+$string['group']                          = 'Grupo';
 $string['hbar_blue']                      = '';
 $string['hbar_blue_r']                    = '';
 $string['hbar_green']                     = '';

+ 1 - 0
lang/es/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 3 - 0
lang/fr/iassign.php

@@ -42,6 +42,7 @@ $string['author_id_modified']             = 'Derner modification fait par :';
 $string['auto_evaluate']                  = 'Il y a un évaluateur automatique?';
 $string['auto_evaluate_help']             = 'Ce qui signifie une évaluation automatique de chaque iMA? Cela dépend du modèle mis en œuvre. '.
         'Si le module dispose d\'une évaluation automatique, sélectionnez Oui pour utiliser une activité avec évaluation automatique.';
+$string['auto_evaluate_reprocess']        = 'Réévaluer automatiquement';
 $string['auto_result']                    = 'Résultat de l\'évaluation automatique :';
 $string['automatic_evaluate']             = 'Il faut utiliser l\'évaluation automatique dans cette activité';
 $string['availabledate']                  = 'Disponible à partir de';
@@ -246,6 +247,7 @@ $string['filejarnotfound']                = 'Fichier JAR introuvable. Avertir l\
 $string['filenotfound']                   = 'Fichier de la tâche ne pas trouvé. Informez le professeur.';
 $string['files_course']                   = 'Fichiers d\'activités interactives';
 $string['files_jar_ilm']                  = 'Liste fichier (s) JAR d\'iMA';
+$string['full_screen']                    = 'Plein écran';
 $string['functions']                      = 'Les fonctions';
 $string['general']                        = 'Général';
 $string['general_fields']                 = 'Paramètres communs aux activités interactives';
@@ -262,6 +264,7 @@ $string['grade_max']                      = 'Score maximum';
 $string['grade_student']                  = 'Score de l\'étudiant';
 $string['grades']                         = 'Historique des tâches';
 $string['graphic']                        = 'Graphic';
+$string['group']                          = 'Groupe';
 $string['hbar_blue']                      = '';
 $string['hbar_blue_r']                    = '';
 $string['hbar_green']                     = '';

+ 1 - 0
lang/fr/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 1 - 0
lang/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 3 - 0
lang/pt_br/iassign.php

@@ -41,6 +41,7 @@ $string['author_id_modified']             = 'Última alteração realizada por:'
 $string['auto_evaluate']                  = 'Possui avaliador automático?';
 $string['auto_evaluate_help']             = 'O que significa avaliação automática? Isso depende do modelo implementado pelo iMA. '.
         'Se o iMA tem avaliação automática, selecione Sim para usar seu avaliador automático.';
+$string['auto_evaluate_reprocess']        = 'Reavaliar automaticamente';
 $string['auto_result']                    = 'Resultado da avaliação automática:';
 $string['automatic_evaluate']             = 'Usar avaliação automática na atividade?';
 $string['availabledate']                  = 'Disponível a partir de';
@@ -245,6 +246,7 @@ $string['filejarnotfound']                = 'Arquivo JAR não encontrado. Inform
 $string['filenotfound']                   = 'Arquivo da atividade não encontrado. Informe o professor.';
 $string['files_course']                   = 'Arquivos das atividades interativas';
 $string['files_jar_ilm']                  = 'Relação de arquivo(s) jar do iMA';
+$string['full_screen']                    = 'Tela cheia';
 $string['functions']                      = 'Funções';
 $string['general']                        = 'Geral';
 $string['general_fields']                 = 'Configurações comuns para as atividades interativas';
@@ -261,6 +263,7 @@ $string['grade_max']                      = 'Nota máxima';
 $string['grade_student']                  = 'Nota do aluno';
 $string['grades']                         = 'Histório das avaliações';
 $string['graphic']                        = 'Gráficos';
+$string['group']                          = 'Grupo';
 $string['hbar_blue']                      = '';
 $string['hbar_blue_r']                    = '';
 $string['hbar_green']                     = '';

+ 1 - 0
lang/pt_br/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">

+ 76 - 114
locallib.php

@@ -429,7 +429,7 @@ class iassign {
 
 
   /// This method gets the content from the iLM and register it
-  //  It could be the exercise model (teacher) or an answer (student)
+  //  It could be the exercise (teacher) or an answer (student)
   function get_answer () {
     
     global $USER, $CFG, $DB, $OUTPUT;
@@ -727,25 +727,6 @@ class iassign {
     exit;
     } // function export_file_answer()
 
-
-  /// Prepare data to static exportation (with course name, iAsssing block name, and exercices names
-  //  @calledby $this->export_package_answer()
-  //TODO_HTML
-  function htmlcode_2_export ($course_fullname, $course_id, $iassign_block_id, $iassign_block_name, $array_iassign_name, $array_iassign_id, $userid, $username) {
-    $str_html  = "<html  dir='ltr' lang='pt-br' xml:lang='pt-br'>
- <head>
-  <title>" . get_string('pluginname', 'iassign') . "</title>\n"; // 'iAssign: interactive Learning Activities'
-    $str_html .= " </head>
- <body>\n";
-    $tam = sizeof($array_iassign_name);
-    for ($ii=0; $ii<$tam; $ii++) {
-      //TODO_HTML completar construir HTML com titulo do exercicio e talvez legar com HTML para abri-lo com o iMA
-      }
-    $str_html .= "
- </body>\n</html>";
-    return $str_html;
-    }
-
   /// Export an package (zip) with all answer of students
   //  @calledby $this->action()
   function export_package_answer () {
@@ -1334,9 +1315,11 @@ class iassign {
         $link_print = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=print&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('print') . '&nbsp;' . get_string('print', 'iassign') . "</a>";
         $link_stats = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=stats&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('results') . '&nbsp;' . get_string('graphic', 'iassign') . "</a>";
         $link_export = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=export_csv&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('export_ilm') . '&nbsp;' . get_string('export_csv', 'iassign') . "</a>";
+        $link_auto_evaluate = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=auto_evaluate&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('correct') . '&nbsp;' . get_string('auto_evaluate_reprocess', 'iassign') . "</a>";
         print '<td width=15% align="right">' . $link_stats . '</td>' . "\n";
         print '<td width=15% align="right">' . $link_export . '</td>' . "\n";
-        print '<td width=15% align="right">' . $link_print . '</td>' . "\n";
+        print '<td width=15% align="right">' . $link_auto_evaluate . '</td>' . "\n";
+        print '<td width=15% align="right">' . $link_print . '</td>' . "\n"; 
         } // if ($this->action != 'print')
       print '</tr></table>' . "\n";
       } // if (has_capability('mod/iassign:viewreport', $this->context, $USER->id) && $this->action == 'report')
@@ -3995,7 +3978,6 @@ class ilm {
       $this->ilm = null;
     }
 
-
   /// Shows activity in iLM
   //  @calledby view_iassign_current()
   function view_iLM ($iassign_statement_activity_item, $student_answer, $enderecoPOST, $view_teacherfileversion) {
@@ -6067,7 +6049,6 @@ class ilm_manager {
     die();
     } // function recover_files_ilm()
 
-
   /// List iassign files from course directory
   //  @calledby ilm_manager.php : $ilm_manager_instance->view_files_ilm($iassign_ilm->extension);
   function view_files_ilm ($iassign_ilm_class, $extension) {
@@ -6307,18 +6288,7 @@ class ilm_manager {
       $pathname = $pathname[count($pathname) - 1];
       $fileid = $value->get_id();
       $tmp = explode(".", $filename);
-      //D echo "locallib.php: view_files_ilm(...): filename=$filename, extension=$extension<br/>";
-      //D print_r($tmp); echo "<br/>#tmp=". sizeof($tmp) ."<br/>";
-
-      if (is_array($tmp)) {
-        if (sizeof($tmp)>1)
-          $filetype = $tmp[1];
-        else
-          $filetype = $extension;
-        }
-      else
-        $filetype = $extension;
-
+      $filetype = $tmp[1];
       $author = $value->get_author();
       $timemodified = date("d/m/Y H:i:s", $value->get_timemodified());
       $timecreated = date("d/m/Y H:i:s", $value->get_timecreated());
@@ -6337,110 +6307,102 @@ class ilm_manager {
             }
           }
 
-        $array_iassign_ilm = $DB->get_records("iassign_ilm", array('extension' => $filetype, 'parent' => '0', 'enable' => '1'));
-
-        foreach ($array_iassign_ilm as $iassign_ilm) { // get files from all iLM equivalent
-
-          if (!$iassign_ilm) {
-            $iassign_ilm = new stdClass();
-            $iassign_ilm->id = $ilmid;
-            }
+        $iassign_ilm = $DB->get_record("iassign_ilm", array('extension' => $filetype, 'parent' => '0', 'enable' => '1'));
+        if (!$iassign_ilm) {
+          $iassign_ilm = new stdClass();
+          $iassign_ilm->id = $ilmid;
+          }
 
-          // Do not use $var inside "..." - problem with some "unusual" operational system
-          $url = $CFG->wwwroot . "/pluginfile.php/" . $value->get_contextid() . "/mod_iassign/activity";
-          $fileurl = $url . '/' . $value->get_itemid() . $filepath . $filename;
-          $dirurl = new moodle_url($this->url) . '&ilmid=' . $iassign_ilm->id . '&dirid=' . $fileid;
-
-          $straux = $CFG->wwwroot . "/mod/iassign/ilm_manager.php?from=" . $this->from . "&id=" . $this->id . "&fileid=" . $fileid . "&";
-          $link_add_ilm_iassign = "&nbsp;&nbsp;<a href='" . $straux . "action=addilm&filename=$filename&nbsp;&nbsp;&nbsp;'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
-          $link_add_ilm_tinymce = "&nbsp;&nbsp;<a href='" . $straux . "action=tinymceilm'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
-          $link_add_ilm_atto = "&nbsp;&nbsp;<a href='" . $straux . "action=attoilm'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
-
-          $check_select = "";
-          $link_rename = "";
-          $link_delete = "";
-          $link_duplicate = "&nbsp;&nbsp;<a href='#' onclick='duplicate_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" . iassign_icons::insert('duplicate_iassign') . "</a>\n";
-          $link_edit = "&nbsp;&nbsp;" . iassign_icons::insert('no_edit_iassign');
-          $link_filter = "&nbsp;&nbsp;<a href='#' onclick='preview_ilm(" . $fileid . "," . $ilmid . ");'>" . iassign_icons::insert('preview_iassign') . "</a>\n";
-
-          $link_duplicate = "&nbsp;&nbsp;<a href='#' onclick='duplicate_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" .
-                iassign_icons::insert('duplicate_iassign') . "</a>\n";
-
-          $link_edit = "&nbsp;&nbsp;" . iassign_icons::insert('no_edit_iassign');
-          $link_filter = "&nbsp;&nbsp;<a href='#' onclick='preview_ilm(" . $fileid . "," . $ilmid . ");'>" . iassign_icons::insert('preview_iassign') . "</a>\n";
-
-          if ($value->get_userid() == $USER->id) {
-            if ($iassign_statement_activity_list) {
-                $check_select = "";
-                $link_edit = iassign_icons::insert('edit_iassign_disable');
-                $link_delete = "&nbsp;&nbsp;" . iassign_icons::insert('delete_iassign_disable');
-                $link_rename = "";
-                }
-             else {
-                $check_select = "<input name='selected_file' type='checkbox' value='$fileid'/>\n";
-                $link_edit = "&nbsp;&nbsp;<a href='#' onclick='update_ilm(\"$iassign_ilm->id\", $fileid)'>" . iassign_icons::insert('edit_iassign') . "</a>\n";
-                $link_delete = "&nbsp;&nbsp;<a href='#' onclick='delete_ilm(\"$iassign_ilm->id\", $fileid);'>" . iassign_icons::insert('delete_iassign') . "</a>\n";
-                $link_rename = "&nbsp;&nbsp;<a href='#' onclick='rename_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" . iassign_icons::insert('rename_iassign') . "</a>\n";
-                }
-             } // if ($value->get_userid() == $USER->id)
-
-          if (!in_array($filetype, $extensions_allow)) {
-            $link_edit = "";
-            $link_add_ilm_iassign = "";
-            $link_add_ilm_tinymce = "";
-            $link_add_ilm_atto = "";
-            $link_filter = "";
+        // Do not use $var inside "..." - problem with some "unusual" operational system
+        $url = $CFG->wwwroot . "/pluginfile.php/" . $value->get_contextid() . "/mod_iassign/activity";
+        $fileurl = $url . '/' . $value->get_itemid() . $filepath . $filename;
+        $dirurl = new moodle_url($this->url) . '&ilmid=' . $iassign_ilm->id . '&dirid=' . $fileid;
+
+        $straux = $CFG->wwwroot . "/mod/iassign/ilm_manager.php?from=" . $this->from . "&id=" . $this->id . "&fileid=" . $fileid . "&";
+        $link_add_ilm_iassign = "&nbsp;&nbsp;<a href='" . $straux . "action=addilm&filename=$filename&nbsp;&nbsp;&nbsp;'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
+        $link_add_ilm_tinymce = "&nbsp;&nbsp;<a href='" . $straux . "action=tinymceilm'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
+        $link_add_ilm_atto = "&nbsp;&nbsp;<a href='" . $straux . "action=attoilm'>" . iassign_icons::insert('add_ilm_iassign') . "</a>\n";
+
+        $check_select = "";
+        $link_rename = "";
+        $link_delete = "";
+        $link_duplicate = "&nbsp;&nbsp;<a href='#' onclick='duplicate_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" . iassign_icons::insert('duplicate_iassign') . "</a>\n";
+        $link_edit = "&nbsp;&nbsp;" . iassign_icons::insert('no_edit_iassign');
+        $link_filter = "&nbsp;&nbsp;<a href='#' onclick='preview_ilm(" . $fileid . "," . $ilmid . ");'>" . iassign_icons::insert('preview_iassign') . "</a>\n";
+
+        $link_duplicate = "&nbsp;&nbsp;<a href='#' onclick='duplicate_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" .
+              iassign_icons::insert('duplicate_iassign') . "</a>\n";
+
+        $link_edit = "&nbsp;&nbsp;" . iassign_icons::insert('no_edit_iassign');
+        $link_filter = "&nbsp;&nbsp;<a href='#' onclick='preview_ilm(" . $fileid . "," . $ilmid . ");'>" . iassign_icons::insert('preview_iassign') . "</a>\n";
+
+        if ($value->get_userid() == $USER->id) {
+          if ($iassign_statement_activity_list) {
+              $check_select = "";
+              $link_edit = iassign_icons::insert('edit_iassign_disable');
+              $link_delete = "&nbsp;&nbsp;" . iassign_icons::insert('delete_iassign_disable');
+              $link_rename = "";
+            } else {
+              $check_select = "<input name='selected_file' type='checkbox' value='$fileid'/>\n";
+              $link_edit = "&nbsp;&nbsp;<a href='#' onclick='update_ilm(\"$iassign_ilm->id\", $fileid)'>" . iassign_icons::insert('edit_iassign') . "</a>\n";
+              $link_delete = "&nbsp;&nbsp;<a href='#' onclick='delete_ilm(\"$iassign_ilm->id\", $fileid);'>" . iassign_icons::insert('delete_iassign') . "</a>\n";
+              $link_rename = "&nbsp;&nbsp;<a href='#' onclick='rename_ilm(\"$iassign_ilm->id\", \"$filename\"," . $fileid . ");'>" . iassign_icons::insert('rename_iassign') . "</a>\n";
             }
+          }
+        if (!in_array($filetype, $extensions_allow)) {
+          $link_edit = "";
+          $link_add_ilm_iassign = "";
+          $link_add_ilm_tinymce = "";
+          $link_add_ilm_atto = "";
+          $link_filter = "";
+          }
 
-          if ($value->is_directory()) {
-            $link_delete = "&nbsp;&nbsp;<a href='#' onclick='delete_dir_ilm(\"$iassign_ilm->id\", $fileid);'>" . iassign_icons::insert('delete_dir') . "</a>\n";
-            $link_rename = "&nbsp;&nbsp;<a href='#' onclick='rename_dir_ilm(\"$iassign_ilm->id\", \"" . $pathname . "\"," . $fileid . ");'>" . iassign_icons::insert('rename_dir') . "</a>\n";
-            $output .= "<tr><td>$check_select$link_rename$link_delete</td>
+        if ($value->is_directory()) {
+          $link_delete = "&nbsp;&nbsp;<a href='#' onclick='delete_dir_ilm(\"$iassign_ilm->id\", $fileid);'>" . iassign_icons::insert('delete_dir') . "</a>\n";
+          $link_rename = "&nbsp;&nbsp;<a href='#' onclick='rename_dir_ilm(\"$iassign_ilm->id\", \"" . $pathname . "\"," . $fileid . ");'>" . iassign_icons::insert('rename_dir') . "</a>\n";
+          $output .= "<tr><td>$check_select$link_rename$link_delete</td>
    <td><a href='$dirurl' title='" . get_string('dir', 'iassign') . $pathname . "'>" . iassign_icons::insert('dir') . '&nbsp;' . $pathname . "</a></td>
    <td><center>$author</center></td>
    <td><center>$timecreated</center></td>
    <td><center>$timemodified</center></td></tr>\n";
+          }
+        else if ($this->from == 'iassign') {
+          $new_id = "";
+          $new_class = "";
+          if (isset($_SESSION['file_name']) && $filename == $_SESSION['file_name']) {
+            $new_class = "<div id='new_file' style='position: absolute;'></div>"; unset($_SESSION['file_name']);
+            $new_id = "id='id_new_blink' style='background-color: hsl(244,61%,90%);'";
             }
-          else if ($this->from == 'iassign') {
-            $new_id = "";
-            $new_class = "";
-            if (isset($_SESSION['file_name']) && $filename == $_SESSION['file_name']) {
-              $new_class = "<div id='new_file' style='position: absolute;'></div>"; unset($_SESSION['file_name']);
-              $new_id = "id='id_new_blink' style='background-color: hsl(244,61%,90%);'";
-              }
 
-            $output .= "<tr $new_id><td>$new_class $check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_iassign</td>
+          $output .= "<tr $new_id><td>$new_class $check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_iassign</td>
    <td><a href='$fileurl' title='" . get_string('download_file', 'iassign') . "$filename'>$filename</a></td>
    <td><center>$author</center></td>
    <td><center>$timecreated</center></td>
    <td><center>$timemodified</center></td></tr>\n";
-            }
-          else if ($this->from == 'block') {
-            $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter</td>
+          }
+        else if ($this->from == 'block') {
+          $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter</td>
    <td><a href='$fileurl' title='" . get_string('download_file', 'iassign') . "$filename'>$filename</a></td>
    <td><center>$author</center></td>
    <td><center>$timecreated</center></td>
    <td><center>$timemodified</center></td></tr>\n";
-            }
-          else if ($this->from == 'tinymce') {
-            $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_tinymce</td>
+          }
+        else if ($this->from == 'tinymce') {
+          $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_tinymce</td>
    <td><a href='$fileurl' title='" . get_string('download_file', 'iassign') . "$filename'>$filename</a></td>
    <td><center>$author</center></td>
    <td><center>$timecreated</center></td>
    <td><center>$timemodified</center></td></tr>\n";
-            }
-          else if ($this->from == 'atto') {
-            $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_atto</td>
+          }
+        else if ($this->from == 'atto') {
+          $output .= "<tr><td>$check_select$link_rename$link_delete$link_duplicate$link_edit$link_filter$link_add_ilm_atto</td>
    <td><a href='$fileurl' title='" . get_string('download_file', 'iassign') . "$filename'>$filename</a></td>
    <td><center>$author</center></td>
    <td><center>$timecreated</center></td>
    <td><center>$timemodified</center></td></tr>\n";
-            }
-
-          } // foreach ($array_iassign_ilm as $iassign_ilm)
-
-        } // if (in_array(strtolower($filetype), $extensions) || $value->is_directory() || $this->from == 'block' || $this->from == 'tinymce' || $this->from == 'atto')
-      } // foreach ($files_course as $value)
+          }
+        }
+      }
 
     $basename = explode("/", substr($dir_base, 0, strlen($dir_base) - 1));
     $dir_base = "";

+ 1 - 0
pix/index.html

@@ -1,5 +1,6 @@
 <html>
     <head>
+        <meta charset="UTF-8">
         <title>Acess not allowed! - Acesso não permitido</title>
     </head>
     <body style="color: #FF0000">