Skip to content
Permalink
Browse files

Merge branch 'MDL-33465-master' of git://github.com/ankitagarwal/moodle

Conflicts:
	backup/moodle2/restore_stepslib.php
  • Loading branch information...
Aparup Banerjee
Aparup Banerjee committed Jun 7, 2012
2 parents 25f288f + 336d8c4 commit ac16f1451204739fb8d1df3b62931303c66304c8
Showing with 4 additions and 8 deletions.
  1. +1 −1 backup/moodle2/restore_final_task.class.php
  2. +0 −3 backup/moodle2/restore_stepslib.php
  3. +3 −4 course/view.php
@@ -135,7 +135,7 @@ static public function define_restore_log_rules() {
$rules[] = new restore_log_rule('course', 'report outline', 'report/outline/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'report participation', 'report/participation/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'report stats', 'report/stats/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}&section={course_sectionnumber}', '{course_section}');
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}&sectionid={course_section}', '{course_section}');
// module 'user' rules
$rules[] = new restore_log_rule('user', 'view', 'view.php?id={user}&course={course}', '{user}');
@@ -1050,7 +1050,6 @@ public function process_section($data) {
global $CFG, $DB;
$data = (object)$data;
$oldid = $data->id; // We'll need this later
$oldsection = $data->number;
$restorefiles = false;
@@ -1103,7 +1102,6 @@ public function process_section($data) {
$DB->update_record('course_sections', $section);
$newitemid = $secrec->id;
$oldsection = $secrec->section;
}
// Annotate the section mapping, with restorefiles option if needed
@@ -2560,7 +2558,6 @@ protected function process_module($data) {
$data = (object)$data;
$oldid = $data->id;
$oldsection = $data->sectionnumber;
$this->task->set_old_moduleversion($data->version);
$data->course = $this->task->get_courseid();
@@ -98,12 +98,11 @@
$loglabel = 'view';
$infoid = $course->id;
if(!empty($section)) {
$logparam .= '&section='. $section;
$loglabel = 'view section';
$sectionparams = array('course' => $course->id, 'section' => $section);
if ($coursesections = $DB->get_record('course_sections', $sectionparams, 'id', MUST_EXIST)) {
$infoid = $coursesections->id;
}
$coursesections = $DB->get_record('course_sections', $sectionparams, 'id', MUST_EXIST);
$infoid = $coursesections->id;
$logparam .= '&sectionid='. $infoid;
}
add_to_log($course->id, 'course', $loglabel, "view.php?". $logparam, $infoid);

0 comments on commit ac16f14

Please sign in to comment.
You can’t perform that action at this time.