Skip to content

Commit

Permalink
MDL-18177 backup: adding PHPdocs blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Price committed Feb 20, 2015
1 parent d7891c8 commit e1de40f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
14 changes: 12 additions & 2 deletions availability/condition/group/classes/condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,20 @@ protected function get_debug_string() {
return $this->groupid ? '#' . $this->groupid : 'any';
}

/**
* Include this condition only if we are including groups in restore, or
* if it's a generic 'same activity' one.
*
* @param int $restoreid The restore Id.
* @param int $courseid The ID of the course.
* @param base_logger $logger The logger being used.
* @param string $name Name of item being restored.
* @param base_task $task The task being performed.
*
* @return Integer groupid
*/
public function include_after_restore($restoreid, $courseid, \base_logger $logger,
$name, \base_task $task) {
// Include this condition only if we are including groups in restore, or
// if it's a generic 'any group' one.
return !$this->groupid || $task->get_setting_value('groups');
}

Expand Down
14 changes: 12 additions & 2 deletions availability/condition/grouping/classes/condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,20 @@ protected function get_debug_string() {
}
}

/**
* Include this condition only if we are including groups in restore, or
* if it's a generic 'same activity' one.
*
* @param int $restoreid The restore Id.
* @param int $courseid The ID of the course.
* @param base_logger $logger The logger being used.
* @param string $name Name of item being restored.
* @param base_task $task The task being performed.
*
* @return Integer groupid
*/
public function include_after_restore($restoreid, $courseid, \base_logger $logger,
$name, \base_task $task) {
// Include this condition only if we are including groups in restore, or
// if it's a generic 'same activity' one.
return !$this->groupingid || $task->get_setting_value('groups');
}

Expand Down
2 changes: 2 additions & 0 deletions backup/moodle2/backup_settingslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class backup_users_setting extends backup_generic_setting {}
/**
* root setting to control if backup will include group information
* depends on @backup_users_setting
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_groups_setting extends backup_generic_setting {
}
Expand Down
2 changes: 2 additions & 0 deletions backup/moodle2/restore_settingslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_groups_setting extends restore_generic_setting {
}
Expand Down
6 changes: 4 additions & 2 deletions mod/assign/backup/moodle2/restore_assign_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
*/
class restore_assign_activity_structure_step extends restore_activity_structure_step {

// Store whether submission details should be included. Details may not be included if the
// this is a team submission, but groups/grouping information was not included in the backup.
/**
* Store whether submission details should be included. Details may not be included if the
* this is a team submission, but groups/grouping information was not included in the backup.
*/
protected $includesubmission = true;

/**
Expand Down

0 comments on commit e1de40f

Please sign in to comment.