mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-40843 workshop: sort entries in recent activity block by time
This commit is contained in:
parent
a1bff2f92a
commit
9fb549a543
1 changed files with 3 additions and 1 deletions
|
@ -379,7 +379,8 @@ function workshop_print_recent_activity($course, $viewfullnames, $timestart) {
|
|||
WHERE cm.course = ?
|
||||
AND md.name = 'workshop'
|
||||
AND s.example = 0
|
||||
AND (s.timemodified > ? OR a.timemodified > ?)";
|
||||
AND (s.timemodified > ? OR a.timemodified > ?)
|
||||
ORDER BY s.timemodified";
|
||||
|
||||
$rs = $DB->get_recordset_sql($sql, array($course->id, $timestart, $timestart));
|
||||
|
||||
|
@ -539,6 +540,7 @@ function workshop_print_recent_activity($course, $viewfullnames, $timestart) {
|
|||
if (!empty($assessments)) {
|
||||
$shown = true;
|
||||
echo $OUTPUT->heading(get_string('recentassessments', 'workshop'), 3);
|
||||
core_collator::asort_objects_by_property($assessments, 'timemodified');
|
||||
foreach ($assessments as $id => $assessment) {
|
||||
$link = new moodle_url('/mod/workshop/assessment.php', array('asid' => $id));
|
||||
if ($assessment->reviewernamevisible) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue