mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts: course/lib.php
This commit is contained in:
commit
6eee89bc8f
191 changed files with 280 additions and 274 deletions
|
@ -148,7 +148,7 @@ class backup_section_task extends backup_task {
|
|||
// All these are common settings to be shared by all sections
|
||||
|
||||
$section = $DB->get_record('course_sections', array('id' => $this->sectionid), '*', MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id' => $section->course), '*', MUST_EXIST);
|
||||
$course = get_course($section->course);
|
||||
|
||||
// Define section_included (to decide if the whole task must be really executed)
|
||||
$settingname = $settingprefix . 'included';
|
||||
|
|
|
@ -1422,7 +1422,7 @@ class restore_course_structure_step extends restore_structure_step {
|
|||
}
|
||||
|
||||
// Course record ready, update it
|
||||
$DB->update_record('course', $data);
|
||||
update_course_record($data);
|
||||
|
||||
course_get_format($data)->update_course_format_options($data);
|
||||
|
||||
|
@ -1632,7 +1632,7 @@ class restore_default_enrolments_step extends restore_execution_step {
|
|||
public function define_execution() {
|
||||
global $DB;
|
||||
|
||||
$course = $DB->get_record('course', array('id'=>$this->get_courseid()), '*', MUST_EXIST);
|
||||
$course = get_course($this->get_courseid());
|
||||
|
||||
if ($DB->record_exists('enrol', array('courseid'=>$this->get_courseid(), 'enrol'=>'manual'))) {
|
||||
// Something already added instances, do not add default instances.
|
||||
|
@ -1849,7 +1849,7 @@ class restore_fix_restorer_access_step extends restore_execution_step {
|
|||
return;
|
||||
}
|
||||
if (!$DB->record_exists('enrol', array('enrol'=>'manual', 'courseid'=>$courseid))) {
|
||||
$course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
|
||||
$course = get_course($courseid);
|
||||
$fields = array('status'=>ENROL_INSTANCE_ENABLED, 'enrolperiod'=>$enrol->get_config('enrolperiod', 0), 'roleid'=>$enrol->get_config('roleid', 0));
|
||||
$enrol->add_instance($course, $fields);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue