Skip to content

Commit

Permalink
MDL-18177 backup: addressing coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Price committed Feb 20, 2015
1 parent 5ef6f97 commit d7891c8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions admin/settings/courses.php
Expand Up @@ -196,7 +196,9 @@
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_groups', new lang_string('generalgroups','backup'), new lang_string('configgeneralgroups','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_groups',
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));

$ADMIN->add('backups', $temp);

Expand Down Expand Up @@ -273,7 +275,8 @@
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups','backup'), new lang_string('configgeneralgroups','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups', 'backup'),
new lang_string('configgeneralgroups', 'backup'), 1));

//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', new lang_string('messages', 'message'), new lang_string('backupmessageshelp','message'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', new lang_string('blogs', 'blog'), new lang_string('backupblogshelp','blog'), 0));
Expand Down
3 changes: 2 additions & 1 deletion backup/moodle2/backup_settingslib.php
Expand Up @@ -69,7 +69,8 @@ class backup_users_setting extends backup_generic_setting {}
* root setting to control if backup will include group information
* depends on @backup_users_setting
*/
class backup_groups_setting extends backup_generic_setting {}
class backup_groups_setting extends backup_generic_setting {
}

/**
* root setting to control if backup will include activities or no.
Expand Down
3 changes: 1 addition & 2 deletions backup/moodle2/backup_stepslib.php
Expand Up @@ -1154,7 +1154,6 @@ protected function define_structure() {
// To know if we are including groups and groupings.
$groupinfo = $this->get_setting_value('groups');


// Define each element separated

$groups = new backup_nested_element('groups');
Expand Down Expand Up @@ -1210,7 +1209,7 @@ protected function define_structure() {
AND bi.itemname = 'groupingfinal'", array(backup::VAR_BACKUPID));
$groupinggroup->set_source_table('groupings_groups', array('groupingid' => backup::VAR_PARENTID));

// This only happens if we are including users
// This only happens if we are including users.
if ($userinfo) {
$member->set_source_table('groups_members', array('groupid' => backup::VAR_PARENTID));
}
Expand Down
3 changes: 2 additions & 1 deletion backup/moodle2/restore_settingslib.php
Expand Up @@ -47,7 +47,8 @@ class restore_users_setting extends restore_generic_setting {}
* root setting to control if restore will create groups/grouping information.
* depends on @restore_users_setting
*/
class restore_groups_setting extends restore_generic_setting {}
class restore_groups_setting extends restore_generic_setting {
}

/**
* root setting to control if restore will create role assignments
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/backup/moodle2/restore_assign_stepslib.php
Expand Up @@ -134,7 +134,7 @@ protected function process_assign_submission($data) {

if (!$this->includesubmission) {
return;
}
}

$data = (object)$data;
$oldid = $data->id;
Expand Down

0 comments on commit d7891c8

Please sign in to comment.