|
@@ -3,9 +3,9 @@
|
|
|
|
|
|
* Class that implements ilm_handle, in order to allow manipulation and management of HTML5 iLM
|
|
|
*
|
|
|
- * @author Igor Moreira Félix
|
|
|
+ * @author Igor Moreira Fe'lix
|
|
|
* @author Patricia Alves Rodrigues
|
|
|
- * @author Leônidas O. Brandão
|
|
|
+ * @author Leo^nidas O. Branda~o
|
|
|
* @version v 1 2017/17/10
|
|
|
* @package mod_iassign_ilm_handlers
|
|
|
* @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
|
|
@@ -22,6 +22,7 @@ class html5 implements ilm_handle {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
public static function build_ilm_tags ($ilm_id, $options = array()) {
|
|
|
global $DB, $OUTPUT;
|
|
|
global $CONF_WWW;
|
|
@@ -203,6 +204,9 @@ class html5 implements ilm_handle {
|
|
|
if (!$fileid) {
|
|
|
print iassign::warning_message_iassign('error_exercise_removed') . "<br/>\n";
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
$ilm_name = strtolower($ilm->name);
|
|
@@ -490,7 +494,7 @@ class html5 implements ilm_handle {
|
|
|
$iassign_ilm->file_jar = null;
|
|
|
|
|
|
$application_xml = @simplexml_load_file($CFG->dataroot . '/temp/' . 'ilm-application.xml', null, LIBXML_NOCDATA);
|
|
|
- $file_jar = self::save_ilm_by_xml($application_xml, $files_extract);
|
|
|
+ $file_jar = self::save_ilm_by_xml($application_xml, $files_extract);
|
|
|
|
|
|
if ($file_jar == null) {
|
|
|
return false;
|
|
@@ -536,7 +540,7 @@ class html5 implements ilm_handle {
|
|
|
$iassign_ilm = $DB->get_record('iassign_ilm', array('id' => $ilm_id));
|
|
|
|
|
|
$iassign_ilm_configs = $DB->get_records('iassign_ilm_config', array('iassign_ilmid' => $ilm_id));
|
|
|
-
|
|
|
+
|
|
|
|
|
|
$files_jar = $iassign_ilm->file_jar;
|
|
|
|
|
@@ -730,6 +734,10 @@ class html5 implements ilm_handle {
|
|
|
$updentry->enable = $param->enable;
|
|
|
$updentry->timemodified = $param->timemodified;
|
|
|
$updentry->evaluate = $param->evaluate;
|
|
|
+ $updentry->reevaluate = $param->reevaluate;
|
|
|
+ $updentry->editingbehavior = $param->editingbehavior;
|
|
|
+ $updentry->submissionbehavior = $param->submissionbehavior;
|
|
|
+
|
|
|
|
|
|
|
|
|
$DB->update_record("iassign_ilm", $updentry);
|
|
@@ -812,16 +820,19 @@ class html5 implements ilm_handle {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- print($OUTPUT->notification(get_string('error_import_ilm_version', 'iassign'), 'notifyproblem'));
|
|
|
+ print($OUTPUT->notification(get_string('error_import_ilm_version', 'iassign'), 'notifyproblem'));
|
|
|
return false;
|
|
|
}
|
|
|
else {
|
|
|
$file_jar = self::save_ilm_by_xml($application_xml, $files_extract);
|
|
|
- if ($file_jar == null) {
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if ($file_jar == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$file_jar = str_replace("./", "", $file_jar);
|
|
|
+
|
|
|
|
|
|
if (empty($file_jar)) {
|
|
|
$msg_error = get_string('error_add_ilm', 'iassign') . "<br/>In new_ilm: file_jar empty, files_extract=" . $files_extract . "<br/>\n";
|
|
@@ -830,7 +841,9 @@ class html5 implements ilm_handle {
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
- $iassign_ilm = $DB->get_record('iassign_ilm', array("parent" => 0, "name" => (String) $application_xml->name));
|
|
|
+ $ilm_xml_name = (String) $application_xml->name;
|
|
|
+
|
|
|
+ $iassign_ilm = $DB->get_record('iassign_ilm', array("parent" => 0, "name" => $ilm_xml_name));
|
|
|
if (!$iassign_ilm) {
|
|
|
$iassign_ilm = new stdClass();
|
|
|
$iassign_ilm->id = 0;
|
|
@@ -859,6 +872,9 @@ class html5 implements ilm_handle {
|
|
|
$newentry->submissionbehavior = (String) $application_xml->submissionbehavior;
|
|
|
$newentry->action_buttons = (String) $application_xml->action_buttons;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
$newentry->id = $DB->insert_record("iassign_ilm", $newentry);
|
|
|
|
|
|
|