Explorar el Código

Update 'backup/moodle2/backup_iassign_activity_task.class.php'

Synchronizing iAssign Git with the current iAssign stable version (until Moodle 5.0).
Small changes in: ilm_manager.php, lang/*/iassign.php
Bigger changes in: ilm_manager_form.php, lib.php, settings_form.php, settings.php, version.php, backup/moodle2/*.php, ilm_debug/escreva.php, ilm_handlers/java.php
New iLM versions: iassign/ilm/iFractions/, iassign/ilm/iHanoi/, iassign/ilm/iVProg/
New file (was missing): settings_activities.php
leo hace 1 mes
padre
commit
40e0fb1b86
Se han modificado 1 ficheros con 27 adiciones y 29 borrados
  1. 27 29
      backup/moodle2/backup_iassign_activity_task.class.php

+ 27 - 29
backup/moodle2/backup_iassign_activity_task.class.php

@@ -5,60 +5,58 @@
  * 
  * Release Notes:
  * - v 1.1 2014/01/06
- * 		+ Fix bug in activity name, remove tag filter (backup_iassign_activity_task::define_my_settings).
+ *   + Fix bug in activity name, remove tag filter (backup_iassign_activity_task::define_my_settings).
  *
  * @author Patricia Alves Rodrigues
- * @author Leônidas O. Brandão
+ * @author Leo^nidas de Oliveira Branda~o
  * @version v 1.1 2014/01/06
  * @package mod_iassign_backup
  * @since 2012
- * @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @cite iMath (http://www.matematica.br) - LInE (www.usp.br/line) - Computer Science Dep. of IME-USP (Brazil)
  * 
  * <b>License</b> 
  *  - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  *  
  * @see backup_activity_task
  */
-/**
- * Moodle core defines constant MOODLE_INTERNAL which shall be used to make sure that the script is included and not called directly.
- */
-defined('MOODLE_INTERNAL') || die();
+
+defined('MOODLE_INTERNAL') || die(); // Moodle core defines constant MOODLE_INTERNAL which shall be used to make sure that the script is included and not called directly.
 
 require_once($CFG->dirroot . '/mod/iassign/backup/moodle2/backup_iassign_stepslib.php');
 
-/**
- * Provides the steps to perform one complete backup of the iAssign instance
- * @see backup_activity_task
- */
+
+// Provides the steps to perform one complete backup of the iAssign instance
+// @see backup_activity_task
 class backup_iassign_activity_task extends backup_activity_task {
 
-  /**
-   * No specific settings for this activity
-   */
-  protected function define_my_settings () {
 
-    //TODO Retirar quando atualizar todo os iassigns que estão com a tag &lt;ia_uc&gt;
+  // No specific settings for this activity
+  protected function define_my_settings () {
+    //TODO Retirar quando atualizar todo os iAssign que estao com a tag &lt;ia_uc&gt;
     $temp = explode("&lt;ia_uc&gt;", $this->name);
     $this->name = $temp[0];
-  }
+    }
 
-  /**
-   * Defines a backup step to store the instance data in the iassign.xml file
-   */
+
+  // Defines a backup step to store the instance data in the 'iassign.xml' file (and 'iassign_ilm.xml')
   protected function define_my_steps () {
     $this->add_step(new backup_iassign_activity_structure_step('iassign_structure', 'iassign.xml'));
-  }
+    // $this->add_step(new backup_iassign_activity_structure_step('iassign_ilm_structure', 'iassign_ilm.xml')); //2023 To register all iLM
+    }
+
 
-  /**
-   * Encodes URLs to various iAssign scripts
-   * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
-   * @return string The content with the URLs encoded
-   */
+  // Transform encoded links (URL) of iAssign, from this Moodle to generic 
+  // mark ("@IASSIGNINDEX" or "@IASSIGNVIEWBYID") to be decoded by restoring process.
+  // Change anything like "http://...backupmoodle/mod/iassign/view.php?id=X" (or "iassign/index.php"), to the
+  // "http://...restoremoodle/mod/iassign/view.php?id=X".
+  // It is used in 'restore_iassign_activity_task.class.php!define_decode_rules()' to restore with correct ID
+  // @param string $content some HTML text that eventually contains URL to the activity instance scripts
+  // @return string The content with the URL encoded
   static public function encode_content_links ($content) {
     global $CFG;
 
     $base = preg_quote($CFG->wwwroot, "/");
-    //  $base = preg_quote($CFG->wwwroot.'/mod/iassign','#');
+    // $base = preg_quote($CFG->wwwroot.'/mod/iassign','#');
     // Link to the list of choices
     $search = "/(" . $base . "\/mod\/iassign\/index.php\?id\=)([0-9]+)/";
     $content = preg_replace($search, '$@IASSIGNINDEX*$2@$', $content);
@@ -68,6 +66,6 @@ class backup_iassign_activity_task extends backup_activity_task {
     $content = preg_replace($search, '$@IASSIGNVIEWBYID*$2@$', $content);
 
     return $content;
-  }
+    }
 
-}
+  } // class backup_iassign_activity_task extends backup_activity_task