Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/backup/moodle2/restore_root_task.class.php

    r136 r1331  
    250250        // So let's define a dependency to prevent false expectations from our users.
    251251        $activities->add_dependency($gradehistories);
     252
     253        // Define groups and groupings.
     254        $defaultvalue = false;
     255        $changeable = false;
     256        if (isset($rootsettings['groups']) && $rootsettings['groups']) { // Only enabled when available.
     257            $defaultvalue = true;
     258            $changeable = true;
     259        } else if (!isset($rootsettings['groups'])) {
     260            // It is likely this is an older backup that does not contain information on the group setting,
     261            // in which case groups should be restored and this setting can be changed.
     262            $defaultvalue = true;
     263            $changeable = true;
     264        }
     265        $groups = new restore_groups_setting('groups', base_setting::IS_BOOLEAN, $defaultvalue);
     266        $groups->set_ui(new backup_setting_ui_checkbox($groups, get_string('rootsettinggroups', 'backup')));
     267        $groups->get_ui()->set_changeable($changeable);
     268        $this->add_setting($groups);
    252269    }
    253270}
Note: See TracChangeset for help on using the changeset viewer.