From b7e16e6acbcd806b3a22a3acaacf1a5f378361a0 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 14 Feb 2004 08:11:02 +0000 Subject: [PATCH] A few more improvements with sorting --- mod/assignment/submissions.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mod/assignment/submissions.php b/mod/assignment/submissions.php index 4d7cc19838..15d02c328b 100644 --- a/mod/assignment/submissions.php +++ b/mod/assignment/submissions.php @@ -4,8 +4,8 @@ require_once("lib.php"); require_variable($id); // Assignment - optional_variable($sort, "lastname"); - optional_variable($dir, "ASC"); + optional_variable($sort, "timemodified"); + optional_variable($dir, "DESC"); $timewas = $_POST['timenow']; $timenow = time(); @@ -62,7 +62,8 @@ } echo ':'; echo ''; - popup_form("submissions.php?id=$assignment->id&group=", $groups, 'selectgroup', $currentgroup, "", "", "", false, "self"); + popup_form("submissions.php?id=$assignment->id&sort=$sort&dir=$dir&group=", + $groups, 'selectgroup', $currentgroup, "", "", "", false, "self"); echo ''; } } @@ -184,7 +185,7 @@ $diricon = $dir == 'ASC' ? 'down' : 'up'; echo " pixpath/t/$diricon.gif\" />"; } - echo "    "; + echo "      "; } echo "

"; @@ -192,7 +193,11 @@ print_spacer(8,1); - echo '
'; + $allowedtograde = ($groupmode != VISIBLEGROUPS or isteacheredit($course->id) or ismember($currentgroup)); + + if ($allowedtograde) { + echo ''; + } $grades = make_grades_menu($assignment->grade); @@ -203,7 +208,7 @@ } } - if ($groupmode != VISIBLEGROUPS or isteacheredit($course->id) or ismember($currentgroup)) { + if ($allowedtograde) { echo "
"; echo ""; echo ""; -- 2.39.5