Skip to content

Commit

Permalink
Fix for ndunand#168 - lost groups to choose
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtppaw committed Jun 24, 2022
1 parent 3e352dc commit 96ef52e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/moodle2/restore_choicegroup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function process_choicegroup_option($data) {
$data->timemodified = $this->apply_date_offset($data->timemodified);

// Check if the groupid exists in this course.
$group = $DB->get_recordset_sql('SELECT g.id FROM {groups} g
$group = $DB->record_exists_sql('SELECT g.id FROM {groups} g
WHERE g.courseid = ? and g.id = ?', array($this->get_courseid(), $data->groupid));
if (!$group) {
// It does not exist in the course already, so try to map the groupid.
Expand Down

0 comments on commit 96ef52e

Please sign in to comment.