mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36: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 = ?
|
WHERE cm.course = ?
|
||||||
AND md.name = 'workshop'
|
AND md.name = 'workshop'
|
||||||
AND s.example = 0
|
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));
|
$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)) {
|
if (!empty($assessments)) {
|
||||||
$shown = true;
|
$shown = true;
|
||||||
echo $OUTPUT->heading(get_string('recentassessments', 'workshop'), 3);
|
echo $OUTPUT->heading(get_string('recentassessments', 'workshop'), 3);
|
||||||
|
core_collator::asort_objects_by_property($assessments, 'timemodified');
|
||||||
foreach ($assessments as $id => $assessment) {
|
foreach ($assessments as $id => $assessment) {
|
||||||
$link = new moodle_url('/mod/workshop/assessment.php', array('asid' => $id));
|
$link = new moodle_url('/mod/workshop/assessment.php', array('asid' => $id));
|
||||||
if ($assessment->reviewernamevisible) {
|
if ($assessment->reviewernamevisible) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue