mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle
Conflicts: admin/oacleanup.php
This commit is contained in:
commit
fb1788c598
18 changed files with 105 additions and 46 deletions
|
@ -39,9 +39,10 @@ while(!feof($fd)) {
|
|||
$action = clam_handle_infected_file($file,$log->userid,true);
|
||||
clam_replace_infected_file($file);
|
||||
|
||||
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
|
||||
$ctxselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
|
||||
$ctxjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel)";
|
||||
$sql = "SELECT c.id, c.fullname $ctxselect FROM {course} c $ctxjoin WHERE c.id = :courseid";
|
||||
$course = $DB->get_record_sql($sql, array('courseid' => $log->course));
|
||||
$course = $DB->get_record_sql($sql, array('courseid' => $log->course, 'contextlevel' => CONTEXT_COURSE));
|
||||
context_helper::preload_from_record($course);
|
||||
|
||||
$user = $DB->get_record("user", array("id"=>$log->userid));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue