当前位置: 首页>>代码示例>>PHP>>正文


PHP backup_nested_element::annotate_files方法代码示例

本文整理汇总了PHP中backup_nested_element::annotate_files方法的典型用法代码示例。如果您正苦于以下问题:PHP backup_nested_element::annotate_files方法的具体用法?PHP backup_nested_element::annotate_files怎么用?PHP backup_nested_element::annotate_files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在backup_nested_element的用法示例。


在下文中一共展示了backup_nested_element::annotate_files方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $jclic = new backup_nested_element('jclic', array('id'), array('name', 'intro', 'introformat', 'url', 'skin', 'maxattempts', 'width', 'height', 'avaluation', 'maxgrade', 'grade', 'lang', 'exiturl', 'timeavailable', 'timedue'));
     $sessions = new backup_nested_element('sessions');
     $session = new backup_nested_element('session', array('id'), array('session_id', 'user_id', 'session_datetime', 'project_name', 'session_key', 'session_code', 'session_context'));
     $activities = new backup_nested_element('sessionactivities');
     $activity = new backup_nested_element('sessionactivity', array('id'), array('session_id', 'activity_id', 'activity_name', 'num_actions', 'score', 'activity_solved', 'qualification', 'total_time', 'activity_code'));
     // Build the tree
     $jclic->add_child($sessions);
     $sessions->add_child($session);
     $session->add_child($activities);
     $activities->add_child($activity);
     // Define sources
     $jclic->set_source_table('jclic', array('id' => backup::VAR_ACTIVITYID));
     // All the rest of elements only happen if we are including user info
     if ($userinfo) {
         $session->set_source_table('jclic_sessions', array('jclicid' => backup::VAR_PARENTID));
         $activity->set_source_table('jclic_activities', array('session_id' => '../../session_id'));
     }
     // Define id annotations
     $jclic->annotate_ids('scale', 'grade');
     $session->annotate_ids('user', 'user_id');
     // Define file annotations
     $jclic->annotate_files('mod_jclic', 'intro', null);
     // This file area hasn't itemid
     $jclic->annotate_files('mod_jclic', 'content', null);
     // This file area hasn't itemid
     // Return the root element (jclic), wrapped into standard activity structure
     return $this->prepare_activity_structure($jclic);
 }
开发者ID:danielvdml,项目名称:moodleyarcho,代码行数:33,代码来源:backup_jclic_stepslib.php

示例2: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $imscp = new backup_nested_element('imscp', array('id'), array('name', 'intro', 'introformat', 'revision', 'keepold', 'structure', 'timemodified'));
     // Build the tree
     // (love this)
     // Define sources
     $imscp->set_source_table('imscp', array('id' => backup::VAR_ACTIVITYID));
     // Define id annotations
     // (none)
     // Define file annotations
     $imscp->annotate_files('mod_imscp', 'intro', null);
     // This file area hasn't itemid
     $imscp->annotate_files('mod_imscp', 'backup', null);
     // This file area hasn't itemid
     /**
      * I don't like itemid used for "imaginative" things like "revisions"!
      * I don't like itemid used for "imaginative" things like "revisions"!
      * I don't like itemid used for "imaginative" things like "revisions"!
      */
     $imscp->annotate_files('mod_imscp', 'content', null);
     // Horrible use of itemid here. Ignoring for backup/restore purposes
     // Return the root element (imscp), wrapped into standard activity structure
     return $this->prepare_activity_structure($imscp);
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:27,代码来源:backup_imscp_stepslib.php

示例3: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $geogebra = new backup_nested_element('geogebra', array('id'), array('name', 'intro', 'introformat', 'url', 'attributes', 'width', 'height', 'showsubmit', 'grade', 'autograde', 'maxattempts', 'grademethod', 'timeavailable', 'timedue', 'timecreated', 'timemodified'));
     $attempts = new backup_nested_element('attempts');
     $attempt = new backup_nested_element('attempt', array('id'), array('geogebra', 'userid', 'vars', 'gradecomment', 'finished', 'dateteacher', 'datestudent'));
     // Build the tree
     $geogebra->add_child($attempts);
     $attempts->add_child($attempt);
     // Define sources
     $geogebra->set_source_table('geogebra', array('id' => backup::VAR_ACTIVITYID));
     // All the rest of elements only happen if we are including user info
     if ($userinfo) {
         $attempt->set_source_table('geogebra_attempts', array('geogebra' => backup::VAR_PARENTID));
     }
     // Define id annotations
     $geogebra->annotate_ids('scale', 'grade');
     $attempt->annotate_ids('user', 'userid');
     // Define file annotations
     $geogebra->annotate_files('mod_geogebra', 'intro', null);
     // This file area hasn't itemid
     $geogebra->annotate_files('mod_geogebra', 'content', null);
     // This file area hasn't itemid
     // Return the root element (geogebra), wrapped into standard activity structure
     return $this->prepare_activity_structure($geogebra);
 }
开发者ID:ninelanterns,项目名称:moodle-mod_geogebra,代码行数:28,代码来源:backup_geogebra_stepslib.php

示例4: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo.
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated.
     $lightboxgallery = new backup_nested_element('lightboxgallery', array('id'), array('course', 'folder', 'name', 'perpage', 'comments', 'extinfo', 'timemodified', 'ispublic', 'rss', 'autoresize', 'resize', 'perrow', 'captionfull', 'captionpos', 'intro', 'introformat'));
     $comments = new backup_nested_element('usercomments');
     $comment = new backup_nested_element('comment', array('id'), array('gallery', 'userid', 'commenttext', 'timemodified'));
     $imagemetas = new backup_nested_element('image_metas');
     $imagemeta = new backup_nested_element('image_meta', array('id'), array('gallery', 'image', 'description', 'metatype'));
     // Build the tree.
     $lightboxgallery->add_child($comments);
     $comments->add_child($comment);
     $lightboxgallery->add_child($imagemetas);
     $imagemetas->add_child($imagemeta);
     // Define sources.
     $lightboxgallery->set_source_table('lightboxgallery', array('id' => backup::VAR_ACTIVITYID));
     $imagemeta->set_source_table('lightboxgallery_image_meta', array('gallery' => backup::VAR_PARENTID));
     // All the rest of elements only happen if we are including user info.
     if ($userinfo) {
         $comment->set_source_table('lightboxgallery_comments', array('gallery' => backup::VAR_PARENTID));
     }
     // Define file annotations.
     $lightboxgallery->annotate_files('mod_lightboxgallery', 'gallery_images', null);
     $lightboxgallery->annotate_files('mod_lightboxgallery', 'gallery_thumbs', null);
     $lightboxgallery->annotate_files('mod_lightboxgallery', 'gallery_index', null);
     $lightboxgallery->annotate_files('mod_lightboxgallery', 'intro', null);
     $comment->annotate_ids('user', 'userid');
     // Return the root element (lightboxgallery), wrapped into standard activity structure.
     return $this->prepare_activity_structure($lightboxgallery);
 }
开发者ID:POETGroup,项目名称:moodle-mod_lightboxgallery,代码行数:31,代码来源:backup_lightboxgallery_stepslib.php

示例5: define_structure

    protected function define_structure() {

        // To know if we are including userinfo
        $userinfo = $this->get_setting_value('userinfo');

        // Define each element separated
        $folder = new backup_nested_element('folder', array('id'), array(
            'name', 'intro', 'introformat', 'revision',
            'timemodified'));

        // Build the tree
        // (nice mono-tree, lol)

        // Define sources
        $folder->set_source_table('folder', array('id' => backup::VAR_ACTIVITYID));

        // Define id annotations
        // (none)

        // Define file annotations
        $folder->annotate_files('mod_folder', 'intro', null);
        $folder->annotate_files('mod_folder', 'content', null);

        // Return the root element (folder), wrapped into standard activity structure
        return $this->prepare_activity_structure($folder);
    }
开发者ID:JP-Git,项目名称:moodle,代码行数:26,代码来源:backup_folder_stepslib.php

示例6: define_structure

 /**
  * Used in activity_task
  *
  * @return prepared structure of elang for activity task
  */
 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $elang = new backup_nested_element('elang', array('id'), array('course', 'name', 'intro', 'introformat', 'timecreated', 'timemodified', 'language', 'options'));
     $cues = new backup_nested_element('cues');
     $cue = new backup_nested_element('cue', array('id'), array('id_elang', 'number', 'begin', 'end', 'title', 'json'));
     $users = new backup_nested_element('users');
     $user = new backup_nested_element('user', array('id'), array('id_user', 'json'));
     // Build the tree
     $elang->add_child($cues);
     $cues->add_child($cue);
     $cue->add_child($users);
     $users->add_child($user);
     // Define sources
     $elang->set_source_table('elang', array('id' => backup::VAR_ACTIVITYID));
     $cue->set_source_table('elang_cues', array('id_elang' => backup::VAR_PARENTID), 'id ASC');
     // Define source for users if userinfo is set
     if ($userinfo) {
         $user->set_source_table('elang_users', array('id_cue' => backup::VAR_PARENTID), 'id ASC');
     }
     // Define id annotations
     $user->annotate_ids('user', 'id_user');
     // Define file annotations-These files areas haven't itemid
     $elang->annotate_files('mod_elang', 'videos', null);
     $elang->annotate_files('mod_elang', 'poster', null);
     $elang->annotate_files('mod_elang', 'subtitle', null);
     // Return the root element (elang), wrapped into standard activity structure
     return $this->prepare_activity_structure($elang);
 }
开发者ID:e-lang,项目名称:moodle-mod_elang,代码行数:36,代码来源:backup_elang_stepslib.php

示例7: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     $els = array('name', 'subwikis', 'intro', 'editbegin', 'editend', 'annotation', 'introformat', 'completionedits', 'completionpages', 'enablewordcount', 'allowimport');
     if (!$userinfo) {
         $els[] = 'template';
     }
     // Define each element separated
     $ouwiki = new backup_nested_element('ouwiki', array('id'), $els);
     $subwikis = new backup_nested_element('subs');
     $subwiki = new backup_nested_element('subwiki', array('id'), array('groupid', 'userid', 'magic'));
     $pages = new backup_nested_element('pages');
     $page = new backup_nested_element('page', array('id'), array('title', 'currentversionid', 'locked'));
     $versions = new backup_nested_element('versions');
     $version = new backup_nested_element('version', array('id'), array('xhtml', 'changestart', 'changesize', 'changeprevsize', 'deletedat', 'timecreated', 'userid', 'wordcount'));
     $annotations = new backup_nested_element('annotations');
     $annotation = new backup_nested_element('annotation', array('id'), array('userid', 'timemodified', 'content'));
     $links = new backup_nested_element('links');
     $link = new backup_nested_element('link', array('id'), array('topageid', 'tomissingpage', 'tourl'));
     // Build the tree
     $ouwiki->add_child($subwikis);
     $subwikis->add_child($subwiki);
     $subwiki->add_child($pages);
     $pages->add_child($page);
     $page->add_child($versions);
     $versions->add_child($version);
     $version->add_child($links);
     $links->add_child($link);
     $page->add_child($annotations);
     $annotations->add_child($annotation);
     // Define sources
     $ouwiki->set_source_table('ouwiki', array('id' => backup::VAR_ACTIVITYID));
     // All these source definitions only happen if we are including user info
     if ($userinfo) {
         $subwiki->set_source_table('ouwiki_subwikis', array('wikiid' => backup::VAR_PARENTID));
         $page->set_source_table('ouwiki_pages', array('subwikiid' => backup::VAR_PARENTID));
         $version->set_source_table('ouwiki_versions', array('pageid' => backup::VAR_PARENTID));
         $link->set_source_table('ouwiki_links', array('fromversionid' => backup::VAR_PARENTID));
         $annotation->set_source_table('ouwiki_annotations', array('pageid' => backup::VAR_PARENTID));
     }
     // Define id annotations
     $subwiki->annotate_ids('group', 'groupid');
     $subwiki->annotate_ids('user', 'userid');
     $version->annotate_ids('user', 'userid');
     $annotation->annotate_ids('user', 'userid');
     // Define file annotations
     $ouwiki->annotate_files('mod_ouwiki', 'intro', null);
     // This file area hasn't itemid
     if (!$userinfo) {
         $ouwiki->annotate_files('mod_ouwiki', 'template', 'id');
     }
     $version->annotate_files('mod_ouwiki', 'attachment', 'id');
     $version->annotate_files('mod_ouwiki', 'content', 'id');
     // Return the root element (wiki), wrapped into standard activity structure
     return $this->prepare_activity_structure($ouwiki);
 }
开发者ID:michaudg,项目名称:moodle-mod_ouwiki,代码行数:57,代码来源:backup_ouwiki_stepslib.php

示例8: define_structure

 /**
  * Define the structure for the setask activity
  * @return void
  */
 protected function define_structure()
 {
     // To know if we are including userinfo.
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated.
     $setask = new backup_nested_element('setask', array('id'), array('name', 'intro', 'introformat', 'alwaysshowdescription', 'submissiondrafts', 'sendnotifications', 'sendlatenotifications', 'sendstudentnotifications', 'duedate', 'cutoffdate', 'allowsubmissionsfromdate', 'grade', 'timemodified', 'completionsubmit', 'requiresubmissionstatement', 'teamsubmission', 'requireallteammemberssubmit', 'teamsubmissiongroupingid', 'blindmarking', 'revealidentities', 'attemptreopenmethod', 'maxattempts', 'markingworkflow', 'markingallocation', 'preventsubmissionnotingroup'));
     $userflags = new backup_nested_element('userflags');
     $userflag = new backup_nested_element('userflag', array('id'), array('userid', 'setaskment', 'mailed', 'locked', 'extensionduedate', 'workflowstate', 'allocatedmarker'));
     $submissions = new backup_nested_element('submissions');
     $submission = new backup_nested_element('submission', array('id'), array('userid', 'timecreated', 'timemodified', 'status', 'groupid', 'attemptnumber', 'latest'));
     $grades = new backup_nested_element('grades');
     $grade = new backup_nested_element('grade', array('id'), array('userid', 'timecreated', 'timemodified', 'grader', 'grade', 'attemptnumber'));
     $pluginconfigs = new backup_nested_element('plugin_configs');
     $pluginconfig = new backup_nested_element('plugin_config', array('id'), array('plugin', 'subtype', 'name', 'value'));
     // Build the tree.
     $setask->add_child($userflags);
     $userflags->add_child($userflag);
     $setask->add_child($submissions);
     $submissions->add_child($submission);
     $setask->add_child($grades);
     $grades->add_child($grade);
     $setask->add_child($pluginconfigs);
     $pluginconfigs->add_child($pluginconfig);
     // Define sources.
     $setask->set_source_table('setask', array('id' => backup::VAR_ACTIVITYID));
     $pluginconfig->set_source_table('setask_plugin_config', array('setaskment' => backup::VAR_PARENTID));
     if ($userinfo) {
         $userflag->set_source_table('setask_user_flags', array('setaskment' => backup::VAR_PARENTID));
         $submission->set_source_table('setask_submission', array('setaskment' => backup::VAR_PARENTID));
         $grade->set_source_table('setask_grades', array('setaskment' => backup::VAR_PARENTID));
         // Support 2 types of subplugins.
         $this->add_subplugin_structure('setasksubmission', $submission, true);
         $this->add_subplugin_structure('setaskfeedback', $grade, true);
     }
     // Define id annotations.
     $userflag->annotate_ids('user', 'userid');
     $userflag->annotate_ids('user', 'allocatedmarker');
     $submission->annotate_ids('user', 'userid');
     $submission->annotate_ids('group', 'groupid');
     $grade->annotate_ids('user', 'userid');
     $grade->annotate_ids('user', 'grader');
     $setask->annotate_ids('grouping', 'teamsubmissiongroupingid');
     // Define file annotations.
     // These file areas don't have an itemid.
     $setask->annotate_files('mod_setask', 'intro', null);
     $setask->annotate_files('mod_setask', 'introattachment', null);
     // Return the root element (choice), wrapped into standard activity structure.
     return $this->prepare_activity_structure($setask);
 }
开发者ID:krzpassrl,项目名称:SRL_Moodle_db,代码行数:53,代码来源:backup_setask_stepslib.php

示例9: define_structure

 protected function define_structure()
 {
     // Define each element separated.
     $videofile = new backup_nested_element('videofile', array('id'), array('name', 'intro', 'introformat', 'width', 'height', 'timecreated', 'timemodified'));
     // Define sources.
     $videofile->set_source_table('videofile', array('id' => backup::VAR_ACTIVITYID));
     // Define file annotations.
     $videofile->annotate_files('mod_videofile', 'intro', null);
     $videofile->annotate_files('mod_videofile', 'videos', null);
     $videofile->annotate_files('mod_videofile', 'posters', null);
     $videofile->annotate_files('mod_videofile', 'captions', null);
     // Return the root element (videofile), wrapped into standard
     // activity structure.
     return $this->prepare_activity_structure($videofile);
 }
开发者ID:jneubauer,项目名称:moodle-mod_videofile,代码行数:15,代码来源:backup_videofile_stepslib.php

示例10: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $pcast = new backup_nested_element('pcast', array('id'), array('userid', 'name', 'intro', 'introformat', 'userscancomment', 'userscancategorize', 'userscanpost', 'requireapproval', 'displayauthor', 'displayviews', 'image', 'imageheight', 'imagewidth', 'rssepisodes', 'rsssortorder', 'enablerssfeed', 'enableitunes', 'visible', 'explicit', 'subtitle', 'keywords', 'topcategory', 'nestedcategory', 'assessed', 'assesstimestart', 'assesstimefinish', 'scale', 'timecreated', 'timemodified'));
     $episodes = new backup_nested_element('episodes');
     $episode = new backup_nested_element('episode', array('id'), array('userid', 'name', 'summary', 'mediafile', 'duration', 'explicit', 'subtitle', 'keywords', 'topcategory', 'nestedcategory', 'timecreated', 'timemodified', 'approved', 'sequencenumber'));
     $views = new backup_nested_element('views');
     $view = new backup_nested_element('view', array('id'), array('episodeid', 'userid', 'views', 'lastview'));
     $ratings = new backup_nested_element('ratings');
     $rating = new backup_nested_element('rating', array('id'), array('component', 'ratingarea', 'scaleid', 'value', 'userid', 'timecreated', 'timemodified'));
     // Build the tree
     $pcast->add_child($episodes);
     $episodes->add_child($episode);
     $episode->add_child($views);
     $views->add_child($view);
     $episode->add_child($ratings);
     $ratings->add_child($rating);
     // Define sources
     $pcast->set_source_table('pcast', array('id' => backup::VAR_ACTIVITYID));
     // All the rest of elements only happen if we are including user info
     if ($userinfo) {
         $episode->set_source_sql('
         SELECT *
           FROM {pcast_episodes}
          WHERE pcastid = ?', array(backup::VAR_PARENTID));
         $view->set_source_sql('
         SELECT *
           FROM {pcast_views}
          WHERE episodeid = ?', array(backup::VAR_PARENTID));
         $rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID, 'itemid' => backup::VAR_PARENTID, 'component' => 'mod_pcast', 'ratingarea' => 'episode'));
         $rating->set_source_alias('rating', 'value');
     }
     // Define id annotations
     $pcast->annotate_ids('user', 'userid');
     $episode->annotate_ids('user', 'userid');
     $view->annotate_ids('user', 'userid');
     $rating->annotate_ids('scale', 'scaleid');
     $rating->annotate_ids('user', 'userid');
     // Define file annotations
     $pcast->annotate_files('mod_pcast', 'intro', null);
     // This file area hasn't itemid
     $pcast->annotate_files('mod_pcast', 'logo', null);
     $episode->annotate_files('mod_pcast', 'episode', 'id');
     // Return the root element (pcast), wrapped into standard activity structure
     return $this->prepare_activity_structure($pcast);
 }
开发者ID:rtsfc,项目名称:moodle-mod_pcast,代码行数:48,代码来源:backup_pcast_stepslib.php

示例11: define_structure

 protected function define_structure()
 {
     // Define each element separated
     $dialogue = new backup_nested_element('dialogue', array('id'), array('course', 'deleteafter', 'dialoguetype', 'multipleconversations', 'maildefault', 'timemodified', 'name', 'intro', 'edittime'));
     $conversations = new backup_nested_element('conversations');
     $conversation = new backup_nested_element('conversation', array('id'), array('dialogueid', 'userid', 'recipientid', 'lastid', 'lastrecipientid', 'timemodified', 'closed', 'seenon', 'ctype', 'format', 'subject', 'groupid', 'grouping'));
     $entries = new backup_nested_element('entries');
     $entry = new backup_nested_element('entry', array('id'), array('dialogueid', 'conversationid', 'userid', 'recipientid', 'timecreated', 'timemodified', 'mailed', 'text', 'attachment'));
     $readentries = new backup_nested_element('read_entries');
     $read = new backup_nested_element('read_entry', array('id'), array('entryid', 'userid', 'firstread', 'lastread', 'conversationid'));
     // Build the tree
     $dialogue->add_child($conversations);
     $conversations->add_child($conversation);
     $conversation->add_child($entries);
     $entries->add_child($entry);
     $conversation->add_child($readentries);
     $readentries->add_child($read);
     // Define sources
     $dialogue->set_source_table('dialogue', array('id' => backup::VAR_ACTIVITYID));
     $conversation->set_source_table('dialogue_conversations', array('dialogueid' => backup::VAR_PARENTID));
     $entry->set_source_table('dialogue_entries', array('conversationid' => backup::VAR_PARENTID));
     $read->set_source_table('dialogue_read', array('conversationid' => backup::VAR_PARENTID));
     // Define id annotations
     $conversation->annotate_ids('user', 'userid');
     $conversation->annotate_ids('user', 'recipientid');
     $entry->annotate_ids('user', 'userid');
     $entry->annotate_ids('user', 'recipientid');
     $read->annotate_ids('user', 'userid');
     // Define file annotations
     $dialogue->annotate_files('mod_dialogue', 'intro', null);
     // This file area hasn't itemid
     $entry->annotate_files('mod_dialogue', 'attachment', 'id');
     // Return the root element, wrapped into standard activity structure
     return $this->prepare_activity_structure($dialogue);
 }
开发者ID:netspotau,项目名称:moodle-mod_dialogue,代码行数:35,代码来源:backup_dialogue_stepslib.php

示例12: define_structure

 /**
  * Define the structure for the assign activity
  * @return void
  */
 protected function define_structure()
 {
     // To know if we are including userinfo.
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated.
     $blended = new backup_nested_element('blended', array('id'), array('name', 'intro', 'introformat', 'idmethod', 'idtype', 'codebartype', 'lengthuserinfo', 'teammethod', 'numteams', 'nummembers', 'assignment', 'randomkey'));
     $teams = new backup_nested_element('teams');
     $team = new backup_nested_element('team', array('id'), array('id_team', 'itemid', 'name_team', 'userid_leader'));
     $members = new backup_nested_element('members');
     $member = new backup_nested_element('member', array('id'), array('userid', 'id_member', 'id_team', 'leader'));
     //Build the tree
     $blended->add_child($teams);
     $teams->add_child($team);
     $team->add_child($members);
     $members->add_child($member);
     // Define sources
     $blended->set_source_table('blended', array('id' => backup::VAR_ACTIVITYID));
     //TODO remove blended_member estructure
     $member->set_source_table('blended_member', array('id_team' => backup::VAR_PARENTID));
     //$team->set_source_table('blended_team', array('blendedid' => backup::VAR_PARENTID));
     //$assign_grouping->set_source_table('blended_assign_grouping', array('blendedid' => backup::VAR_PARENTID));
     //$member->set_source_table('blended_member', array('blendedid' => backup::VAR_PARENTID));
     //$grade->set_source_table('blended_grade', array('blendedid' => backup::VAR_PARENTID));
     //Anotate ids
     $team->annotate_ids('group', 'id_team');
     $team->annotate_ids('user', 'userid_leader');
     $member->annotate_ids('user', 'userid');
     $member->annotate_ids('group', 'id_team');
     // This file area hasn't itemid.
     $blended->annotate_files('mod_blended', 'intro', null);
     // Return the root element (blended), wrapped into standard activity structure.
     return $this->prepare_activity_structure($blended);
 }
开发者ID:juacas,项目名称:moodle-mod_blended,代码行数:37,代码来源:backup_blended_stepslib.php

示例13: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $groupselect = new backup_nested_element('groupselect', array('id'), array('name', 'intro', 'introformat', 'targetgrouping', 'maxmembers', 'timeavailable', 'timedue', 'timecreated', 'timemodified', 'hidefullgroups', 'deleteemptygroups', 'studentcancreate', 'minmembers', 'assignteachers', 'studentcansetdesc', 'showassignedteacher', 'studentcansetenrolmentkey', 'studentcansetgroupname', 'notifyexpiredselection'));
     $passwords = new backup_nested_element('passwords');
     $password = new backup_nested_element('password', array('id'), array('groupid', 'password'));
     $groupteachers = new backup_nested_element('groupteachers');
     $groupteacher = new backup_nested_element('groupteacher', array('id'), array('groupid', 'teacherid'));
     // Build the tree
     $groupselect->add_child($passwords);
     $passwords->add_child($password);
     $groupselect->add_child($groupteachers);
     $groupteachers->add_child($groupteacher);
     // Define sources
     $groupselect->set_source_table('groupselect', array('id' => backup::VAR_ACTIVITYID));
     $password->set_source_table('groupselect_passwords', array('instance_id' => backup::VAR_ACTIVITYID));
     if ($userinfo) {
         $groupteacher->set_source_table('groupselect_groups_teachers', array('instance_id' => backup::VAR_ACTIVITYID));
     }
     // Define id annotations
     $groupselect->annotate_ids('grouping', 'targetgrouping');
     $password->annotate_ids('group', 'groupid');
     $groupteacher->annotate_ids('group', 'groupid');
     $groupteacher->annotate_ids('user', 'teacherid');
     // Define file annotations
     $groupselect->annotate_files('mod_groupselect', 'intro', null);
     // This file areas haven't itemid
     // Return the root element (groupselect), wrapped into standard activity structure
     return $this->prepare_activity_structure($groupselect);
 }
开发者ID:BLC-HTWChur,项目名称:moodle-mod_groupselect,代码行数:32,代码来源:backup_groupselect_stepslib.php

示例14: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated
     $groupselect = new backup_nested_element('groupselect', array('id'), array('course', 'name', 'intro', 'introformat', 'targetgrouping', 'signuptype', 'password', 'maxmembers', 'individual_limits', 'timeavailable', 'timedue', 'timecreated', 'timemodified'));
     $limits = new backup_nested_element('limits');
     $limit = new backup_nested_element('limit', array('id'), array('groupselect', 'groupid', 'lim'));
     // Build the tree
     $groupselect->add_child($limits);
     $limits->add_child($limit);
     // Define sources
     $groupselect->set_source_table('groupselect', array('id' => backup::VAR_ACTIVITYID));
     $limit->set_source_sql('
         SELECT *
           FROM {groupselect_limits}
           WHERE groupselect = ?', array(backup::VAR_PARENTID));
     // Define id annotations
     $groupselect->annotate_ids('grouping', 'targetgrouping');
     $limit->annotate_ids('group', 'groupid');
     // Define file annotations
     $groupselect->annotate_files('mod_groupselect', 'intro', null);
     // This file area hasn't itemid
     // Return the root element (groupselect), wrapped into standard activity structure
     return $this->prepare_activity_structure($groupselect);
 }
开发者ID:NigelCunningham,项目名称:moodle-mod_groupselect,代码行数:26,代码来源:backup_groupselect_stepslib.php

示例15: define_structure

 protected function define_structure()
 {
     // To know if we are including userinfo.
     $userinfo = $this->get_setting_value('userinfo');
     // Define each element separated.
     $teambuilder = new backup_nested_element('teambuilder', array('id'), array('course', 'name', 'intro', 'introformat', 'open', 'close', 'groupid', 'allowupdate'));
     $questions = new backup_nested_element('questions');
     $question = new backup_nested_element('question', array('id'), array('builder', 'question', 'type', 'display', 'ordinal'));
     $answers = new backup_nested_element('answers');
     $answer = new backup_nested_element('answer', array('id'), array('question', 'answer', 'ordinal'));
     $responses = new backup_nested_element('responses');
     $response = new backup_nested_element('response', array('id'), array('userid', 'answerid'));
     // Build the tree.
     $teambuilder->add_child($questions);
     $questions->add_child($question);
     $question->add_child($answers);
     $answers->add_child($answer);
     $answer->add_child($responses);
     $responses->add_child($response);
     // Define sources.
     $teambuilder->set_source_table('teambuilder', array('id' => backup::VAR_ACTIVITYID));
     $question->set_source_table('teambuilder_question', array('builder' => backup::VAR_PARENTID));
     $answer->set_source_table('teambuilder_answer', array('question' => backup::VAR_PARENTID));
     // All the rest of elements only happen if we are including user info.
     if ($userinfo) {
         $response->set_source_table('teambuilder_response', array('answerid' => backup::VAR_PARENTID));
     }
     $teambuilder->annotate_ids('group', 'groupid');
     $response->annotate_ids('user', 'userid');
     // Define file annotations.
     $teambuilder->annotate_files('mod_teambuilder', 'intro', null);
     // Return the root element (teambuilder), wrapped into standard activity structure.
     return $this->prepare_activity_structure($teambuilder);
 }
开发者ID:netspotau,项目名称:moodle-mod_teambuilder,代码行数:34,代码来源:backup_teambuilder_stepslib.php


注:本文中的backup_nested_element::annotate_files方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。