Browse Source

Update 'settings_ilm.php'

Considering table 'iassign_ilm': messages to fields 'evaluate', 'reevaluate', 'editingbehavior'; fixes to allow the edition of 'reevaluate', 'editingbehavior'
leo 1 year ago
parent
commit
447cbf95f1
1 changed files with 12 additions and 3 deletions
  1. 12 3
      settings_ilm.php

+ 12 - 3
settings_ilm.php

@@ -6,6 +6,8 @@
  * 2. action==new_version
  * 
  * Release Notes:
+ * - v 2.0.1 2022/09/15
+ *   + Considering table 'iassign_ilm': messages to fields 'evaluate', 'reevaluate', 'editingbehavior'; fixes to allow the edition of 'reevaluate', 'editingbehavior'
  * - v 1.6.1 2017/12/02
  *   + Changed 'echo' to 'print'
  * - v 1.6 2013/10/31
@@ -18,8 +20,8 @@
  *   + Insert actions: copy (new version from an iLM) and new version (empty new version).
  * 
  * @author Patricia Alves Rodrigues
- * @author Leônidas O. Brandão
- * @version v 1.6.1 2017/12/02
+ * @author Leo^nidas de Oliveira Branda~o
+ * @version v 2.0.1 2022/09/15
  * @package mod_iassign_settings
  * @since 2013/01/29
  * @see   locallib.php : class ilm_settings
@@ -64,8 +66,15 @@ if ($action == 'edit') { // Edit data of an iLM => processed in 'settings_form.p
   $PAGE->set_title($title);
 
   // Get all fields of this iLM: name, type, set_lang, description_lang, author, action, timecreated, timemodified, parent, ...
+  // On the first time $ilm_id is well defined, but on the second (it is empty), however we need to call "add_edit_copy_ilm(.)"
   $param = ilm_settings::add_edit_copy_ilm($ilm_id, $action); // locallib.php: class ilm_settings: add_edit_copy_ilm($ilm_id, $action)
 
+  // On the first call $ilm_id is defined: the calling is necessary to fill in data to the form
+  // on the second call $ilm_id empty and could be avoided
+  //? if ($ilm_id) $param = ilm_settings::add_edit_copy_ilm($ilm_id, $action); // locallib.php: class ilm_settings: add_edit_copy_ilm($ilm_id, $action)
+  //? else $param = new stdClass();
+  // without 'ilm_settings::add_edit_copy_ilm(.)' the process are not successfully finished
+
   //D echo "settings_ilm.php: edit: $title"; // echo "param->description="; print_r($param->description); 
   //D $description = $param->description_lang; // used to present the iLM description in 'settings_form.php'
   //D $description = $param->description; //TODO in 'settings_form.php' it does NOT present the description!!!
@@ -316,4 +325,4 @@ if ($action == 'view') {
   print($view_ilm);
   print($OUTPUT->footer());
   die;
-  }
+  }