]> git.mjollnir.org Git - moodle.git/commitdiff
Added "graphical structure".
authorstronk7 <stronk7>
Sun, 14 Sep 2003 15:47:36 +0000 (15:47 +0000)
committerstronk7 <stronk7>
Sun, 14 Sep 2003 15:47:36 +0000 (15:47 +0000)
Added label_get_participants() function.

mod/label/backuplib.php
mod/label/lib.php
mod/label/restorelib.php

index 0224de48519d5021ecef26352509596114b2e637..d1a9f83afe701e491d182a2f6aca6aebe98a7a30 100644 (file)
@@ -2,6 +2,20 @@
     //This php script contains all the stuff to backup/restore
     //label mods
 
+    //This is the "graphical" structure of the label mod:
+    //
+    //                       label
+    //                     (CL,pk->id)
+    //
+    // Meaning: pk->primary key field of the table
+    //          fk->foreign key to link with parent
+    //          nt->nested field (recursive data)
+    //          CL->course level info
+    //          UL->user level info
+    //          files->table may have files)
+    //
+    //-----------------------------------------------------------
+
     //This function executes all the backup procedure about this mod
     function label_backup_mods($bf,$preferences) {
         global $CFG;
index 2dbf56fafe7ee5440b760c845077631c13f9f2da..c01d7f78691205e440f0fd9110cfc810d3b872aa 100644 (file)
@@ -72,4 +72,11 @@ function label_user_complete($course, $user, $mod, $label) {
     return false;
 }
 
+function label_get_participants($labelid) {
+//Returns the users with data in one resource
+//(NONE, byt must exists on EVERY mod !!)
+
+    return false;
+}
+
 ?>
index f96d9d16fa8ac8856bb10d6d7040d88198435fe4..32a35ecff90a67b0064b4ffbaae64f9aadc02312 100644 (file)
@@ -2,6 +2,20 @@
     //This php script contains all the stuff to backup/restore
     //label mods
 
+    //This is the "graphical" structure of the label mod:   
+    //
+    //                       label 
+    //                    (CL,pk->id)
+    //
+    // Meaning: pk->primary key field of the table
+    //          fk->foreign key to link with parent
+    //          nt->nested field (recursive data)
+    //          CL->course level info
+    //          UL->user level info
+    //          files->table may have files)
+    //
+    //-----------------------------------------------------------
+
     //This function executes all the restore procedure about this mod
     function label_restore_mods($mod,$restore) {
 
@@ -19,7 +33,7 @@
             //print_object ($GLOBALS['traverse_array']);                                                  //Debug
             //$GLOBALS['traverse_array']="";                                                              //Debug
           
-            //Now, build the RESOURCE record structure
+            //Now, build the LABEL record structure
             $label->course = $restore->course_id;
             $label->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
             $label->content = backup_todb($info['MOD']['#']['CONTENT']['0']['#']);