static protected function build_section_plan($controller, $sectionid) {

        $plan = $controller->get_plan();
        $info = $controller->get_info();
        $infosection = $info->sections[$sectionid];

        // Add the section task, responsible for restoring
        // all the section related information
        $plan->add_task(restore_factory::get_restore_section_task($infosection));
        $controller->get_progress()->progress();
        // For the given section, add as many activity tasks as necessary
        foreach ($info->activities as $activityid => $activity) {
            if ($activity->sectionid != $infosection->sectionid) {
                continue;
            }
            if (plugin_supports('mod', $activity->modulename, FEATURE_BACKUP_MOODLE2)) { // Check we support the format
                self::build_activity_plan($controller, $activityid);
            } else {
                // TODO: Debug information about module not supported
            }
        }
    }
static protected function build_section_plan($controller, $sectionid) {

        $plan = $controller->get_plan();
        $info = $controller->get_info();
        $infosection = $info->sections[$sectionid];

        // Add the section task, responsible for restoring
        // all the section related information
        $plan->add_task(restore_factory::get_restore_section_task($infosection));
        $controller->get_progress()->progress();
        // For the given section, add as many activity tasks as necessary
        foreach ($info->activities as $activityid => $activity) {
            if ($activity->sectionid != $infosection->sectionid) {
                continue;
            }
            if (plugin_supports('mod', $activity->modulename, FEATURE_BACKUP_MOODLE2)) { // Check we support the format
                self::build_activity_plan($controller, $activityid);
            } else {
                // TODO: Debug information about module not supported
            }
        }
    }
static protected function build_section_plan ( $ controller , $ sectionid ) { $ plan = $ controller -> get_plan ( ) ; $ info = $ controller -> get_info ( ) ; $ infosection = $ info -> sections [ $ sectionid ] ; // Add the section task, responsible for restoring // all the section related information $ plan -> add_task ( restore_factory :: get_restore_section_task ( $ infosection ) ) ; $ controller -> get_progress ( ) -> progress ( ) ; // For the given section, add as many activity tasks as necessary foreach ( $ info -> activities as $ activityid => $ activity ) { if ( $ activity -> sectionid != $ infosection -> sectionid ) { continue ; } if ( plugin_supports ( 'mod' , $ activity -> modulename , FEATURE_BACKUP_MOODLE2 ) ) { // Check we support the format self :: build_activity_plan ( $ controller , $ activityid ) ; } else { // TODO: Debug information about module not supported } } }
Restore one 1-section backup
Restore one 1 - section backup