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) { global $CFG; $status = true; //Get record from backup_ids $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id); if ($data) { //Now get completed xmlized object $info = $data->info; //traverse_xmlize($info); //Debug //print_object ($GLOBALS['traverse_array']); //Debug //$GLOBALS['traverse_array']=""; //Debug //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']['#']); $label->timemodified = $info['MOD']['#']['TIMEMODIFIED']['0']['#']; //The structure is equal to the db, so insert the label $newid = insert_record ("label",$label); //Do some output echo "