MDL-32766 course view section log: update patch
This commit is contained in:
+6
-1
@@ -90,11 +90,16 @@
|
||||
|
||||
$logparam = 'id='. $course->id;
|
||||
$loglabel = 'view';
|
||||
$infoid = $course->id;
|
||||
if(!empty($section)) {
|
||||
$logparam .= '§ion='. $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;
|
||||
}
|
||||
add_to_log($course->id, 'course', $loglabel, "view.php?". $logparam, "$course->fullname");
|
||||
}
|
||||
add_to_log($course->id, 'course', $loglabel, "view.php?". $logparam, $infoid);
|
||||
|
||||
$course->format = clean_param($course->format, PARAM_ALPHA);
|
||||
if (!file_exists($CFG->dirroot.'/course/format/'.$course->format.'/format.php')) {
|
||||
|
||||
@@ -38,6 +38,7 @@ global $DB; // TODO: this is a hack, we should really do something with the SQL
|
||||
$logs = array(
|
||||
array('module'=>'course', 'action'=>'user report', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
|
||||
array('module'=>'course', 'action'=>'view', 'mtable'=>'course', 'field'=>'fullname'),
|
||||
array('module'=>'course', 'action'=>'view section', 'mtable'=>'course_section', 'field'=>'COALESCE(name, section)'),
|
||||
array('module'=>'course', 'action'=>'update', 'mtable'=>'course', 'field'=>'fullname'),
|
||||
array('module'=>'course', 'action'=>'enrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
|
||||
array('module'=>'course', 'action'=>'unenrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$version = 2012051900.00; // YYYYMMDD = weekly release date of this DEV branch
|
||||
$version = 2012051900.01; // YYYYMMDD = weekly release date of this DEV branch
|
||||
// RR = release increments - 00 in DEV branches
|
||||
// .XX = incremental changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user