Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19347
Modified Files:
aimpage.php lib.php view.php
Log Message:
now by default shows top 10 students in grade table
general clean-up
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** lib.php 21 Mar 2004 11:42:27 -0000 1.56
--- lib.php 21 Mar 2004 15:33:49 -0000 1.57
***************
*** 406,410 ****
}
! function math_assignment_get_admin_links($cm, $math_assignment, $zonelink=false, $align="left") {
/// Function which prints the admin links
--- 406,410 ----
}
! function math_assignment_get_admin_links($cm, $math_assignment, $align="left") {
/// Function which prints the admin links
***************
*** 415,421 ****
--- 415,423 ----
if ($filelinks)
$return .= "$filelinks<br />\n";
+
// View Quiz
$return .= "<a href=\"aimpage.php?id=$cm->id\">" . get_string("viewquiz", "math_assignment") . "</a></td>\n";
$return .= "<td align=\"right\"><b>" . get_string("adminlinks", "math_assignment") . "</b><br />";
+
// Analyse Results
$stranalyseresults = get_string("analyseresults", "math_assignment");
***************
*** 423,426 ****
--- 425,429 ----
$return .= math_assignment_help_button("analyze_quiz", $stranalyseresults, false);
$return .= "<br />\n";
+
// Edit Quiz
$streditquiz = get_string("editquiz", "math_assignment");
***************
*** 428,431 ****
--- 431,435 ----
$return .= math_assignment_help_button("admin_quiz", $streditquiz, false);
$return .= "<br />\n";
+
// Try Quiz
$strtryquiz = get_string("tryquiz", "math_assignment");
***************
*** 433,454 ****
$return .= math_assignment_help_button("try_quiz", $strtryquiz, false);
$return .= "<br />\n";
// Documentation
! $return .= '<a href="http://aim.york.ac.uk:8080/spring04/doc/index.html" target="doc">AiM documentation</a><br />';
! // Browse Source
! /*$strbrowsesource = get_string("browsesource", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! $return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! $return .= "<br />\n";
! // Edit Subject
! $streditsubject = get_string("editsubject", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=subject\">$streditsubject</a>";
! $return .= math_assignment_help_button("admin_subject", $streditsubject, false);
! if ($zonelink) {
! $return .= "<br />\n";
! // Zone Admin
! $strzoneadmin = get_string("zoneadmin", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=zoneadmin\">$strzoneadmin</a>";
! $return .= math_assignment_help_button("admin_zoneadmin", $strzoneadmin, false);
! }*/
$return .= "</td></table>\n";
}
--- 437,447 ----
$return .= math_assignment_help_button("try_quiz", $strtryquiz, false);
$return .= "<br />\n";
+
// Documentation
! $server = get_field('math_assignment_subjects', 'server', 'course', $math_assignment->course);
! $server = get_field('math_assignment_servers', 'address', 'id', $server);
! $server = substr($server,0,strlen($server)-6);
! $return .= "<a href=\"$server/doc/index.html\" target=\"doc\">AiM documentation</a><br />";
!
$return .= "</td></table>\n";
}
***************
*** 828,893 ****
}
! function math_assignment_get_grades($math_assignment, $sort="lastname", $sortdir="asc", $groupmode=false, $currentgroup=0) {
// returns an array of grades indexed by userid for all students in the course
! global $CFG;
! switch(strtolower($CFG->dbtype)) {
! case 'mysqlll':
! if (strcasecmp($sort, "totalgrade") == 0)
! $sortsql = "totalgrade $sortdir";
! else
! $sortsql = "u.$sort $sortdir";
! $students = get_records_sql("SELECT s.userid, u.firstname, u.lastname, u.email, u.username, u.mailformat, u.picture, g.papergrade, g.aimgrade, g.aimoverride, g.aimcomment, greatest(g.papergrade,0)+greatest(g.aimgrade,0) AS totalgrade FROM {$CFG->prefix}user_students s LEFT JOIN {$CFG->prefix}user u ON s.course = '$math_assignment->course' AND u.id = s.userid LEFT JOIN {$CFG->prefix}math_assignment_grades g ON g.assignment = '$math_assignment->id' AND g.userid = s.userid WHERE u.deleted = '0' ORDER BY $sortsql");
! break;
! default:
! // emulate
! $studentlist = get_records('user_students', 'course', $math_assignment->course);
! if ($studentlist) {
! foreach ($studentlist as $student) {
! if ($groupmode and $currentgroup and !ismember($currentgroup, $student->userid)) {
! continue;
! }
! if ($students[$student->userid] = get_record('user', 'id', $student->userid, 'deleted', 0)) {
! $key = $student->userid;
! $students[$key]->userid = $student->userid;
! $grade = get_record('math_assignment_grades', 'assignment', $math_assignment->id, 'userid', $student->userid);
! if ($grade) {
! $students[$key]->papergrade = $grade->papergrade+0;
! $students[$key]->aimgrade = $grade->aimgrade+0;
! $students[$key]->aimoverride = $grade->aimoverride ;
! $students[$key]->aimcomment = $grade->aimcomment;
! $students[$key]->totalgrade = math_assignment_total_grade($math_assignment, $grade);
! }
! else {
! $students[$key]->papergrade = -1;
! $students[$key]->aimgrade = -1;
! $students[$key]->aimoverride = AIMOVR_OFF ;
! $students[$key]->aimcomment = "";
! $students[$key]->totalgrade = 0;
! }
! }
! else {
! // assume it failed because deleted was not zero
! unset($students[$key]);
! }
! }
! // sort
! if (strcasecmp($sortdir, "desc") == 0)
! $mult = -1;
! else
! $mult = 1;
! if (strcasecmp($sort, "id") == 0)
! uksort($students, create_function('$a, $b', 'return (($a > $b) ? 1 : -1) * ' . $mult . ';'));
! else
! uasort($students, create_function('$a, $b', 'return (($a->' . $sort . ' > $b->' . $sort . ') ? 1 : -1) * ' . $mult . ';'));
}
! break;
! }
! if (count($students) > 1) {
! return $students;
! } else {
! return false;
}
}
--- 821,858 ----
}
! function math_assignment_get_grades($math_assignment, $sort="lastname", $sortdir="asc", $group=NULL, $page=0, $recordsperpage=99999) {
// returns an array of grades indexed by userid for all students in the course
! // the following is necessary because we can't sort by grade in get_course_students
! // if $sort contains 'grade' then we have to do the sort later
! $ssort = (strstr($sort, 'grade')) ? 'lastname' : $sort;
!
! if ($students = get_course_students($math_assignment->course, $ssort, $sortdir, $page, $recordsperpage, '', '', $group)) {
! foreach ($students as $key => $student) {
! $grade = get_record('math_assignment_grades', 'assignment', $math_assignment->id, 'userid', $student->id);
! if ($grade) {
! $students[$key]->papergrade = $grade->papergrade+0;
! $students[$key]->aimgrade = $grade->aimgrade+0;
! $students[$key]->aimoverride = $grade->aimoverride ;
! $students[$key]->aimcomment = $grade->aimcomment;
! $students[$key]->totalgrade = math_assignment_total_grade($math_assignment, $grade);
}
! else {
! $students[$key]->papergrade = -1;
! $students[$key]->aimgrade = -1;
! $students[$key]->aimoverride = AIMOVR_OFF ;
! $students[$key]->aimcomment = "";
! $students[$key]->totalgrade = 0;
! }
! }
!
! // sort now if we could not do it earlier
! if ($sort != $ssort) {
! $mult = (strcasecmp($sortdir, "desc") == 0) ? -1 : 1;
! uasort($students, create_function('$a, $b', 'return (($a->' . $sort . ' > $b->' . $sort . ') ? 1 : -1) * ' . $mult . ';'));
! }
}
+ return $students;
}
Index: view.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** view.php 6 Mar 2004 14:06:52 -0000 1.31
--- view.php 21 Mar 2004 15:33:49 -0000 1.32
***************
*** 8,19 ****
require_once("../../lib/psxlsgen.php");
optional_variable($id); // Course Module ID, or
optional_variable($q); // assignment ID
optional_variable($download, ""); // to download data
! optional_variable($sort, "lastname"); // column to sort
! optional_variable($sortdir, "asc"); // direction to sort
optional_variable($showgrades, NULL); // whether to show grades table
optional_variable($group, -1); // choose the current group
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
--- 8,23 ----
require_once("../../lib/psxlsgen.php");
+ /// declare optional arguments
+
optional_variable($id); // Course Module ID, or
optional_variable($q); // assignment ID
optional_variable($download, ""); // to download data
! optional_variable($sort, "totalgrade"); // column to sort
! optional_variable($sortdir, "desc"); // direction to sort
optional_variable($showgrades, NULL); // whether to show grades table
optional_variable($group, -1); // choose the current group
+ /// load $cm, $course, and $math_assignment
+
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
***************
*** 45,63 ****
}
require_login($course->id);
add_to_log($course->id, "math_assignment", "view", "view.php?id=$cm->id", "$math_assignment->id");
-
- if (isset ($outputchange)) {
- if (strcmp($outputchange, "html") == 0 || strcmp($outputchange, "xml") == 0) {
- // set the cookie
- setcookie("output", $outputchange, 0x7FFFFFFF);
- $_COOKIE['output'] = $outputchange;
- }
- }
$isteacher = isteacher($course->id);
$isstudent = isstudent($course->id);
if (!$isteacher and !$isstudent and !isguest()) {
error("You are not allowed on this page");
--- 49,62 ----
}
+ /// authenticate user and set group
+
require_login($course->id);
add_to_log($course->id, "math_assignment", "view", "view.php?id=$cm->id", "$math_assignment->id");
$isteacher = isteacher($course->id);
$isstudent = isstudent($course->id);
+ // ??? the following appears to allow all anyone
if (!$isteacher and !$isstudent and !isguest()) {
error("You are not allowed on this page");
***************
*** 70,73 ****
--- 69,73 ----
// Check to see if groups are being used in this assignment
// and if so, set $currentgroup to reflect the current group
+ // I copied this from some other module in the early days of groups. Seems to work
$changegroup = isset($_GET['group']) ? $_GET['group'] : -1; // Group change requested?
$groupmode = groupmode($course, $cm); // Groups are being used
***************
*** 79,82 ****
--- 79,94 ----
exit;
}
+
+ /// Set cookie for output format
+
+ if (isset ($outputchange)) {
+ if (strcmp($outputchange, "html") == 0 || strcmp($outputchange, "xml") == 0) {
+ // set the cookie
+ setcookie("output", $outputchange, 0x7FFFFFFF);
+ $_COOKIE['output'] = $outputchange;
+ }
+ }
+
+ /// set up some convenient variables
$hasaim = ($math_assignment->aimgrade > 0);
***************
*** 93,98 ****
$strgrades = get_string("grades");
$strreview = get_string("review", "math_assignment");
! $strshowgradestable = get_string("showgradestable", "math_assignment");
! $strhidegradestable = get_string("hidegradestable", "math_assignment");
if ($course->category) {
--- 105,110 ----
$strgrades = get_string("grades");
$strreview = get_string("review", "math_assignment");
! $strshowall = get_string("showall", "math_assignment");
! $strtopten = get_string("topten", "math_assignment");
if ($course->category) {
***************
*** 104,131 ****
$strmath_assignments = get_string("modulenameplural", "math_assignment");
$strmath_assignment = get_string("modulename", "math_assignment");
! if ($isteacher and ($showgrades or $download)) {
!
! // verify that the sort string is correct
! if (strcasecmp($sort, "lastname") != 0) { // check for field name in most likely used order
! if (strcasecmp($sort, "firstname") != 0) { // to improve speed
! if (strcasecmp($sort, "totalgrade") != 0)
! $sort = "lastname"; // not valid so use default instead
! }
! }
! if (strcasecmp($sortdir, "asc") != 0 && strcasecmp($sortdir, "desc") != 0)
! $sortdir = "asc"; // not valid so use default instead
// Get a list of students for this course including grades
! $students = array();
! $students = math_assignment_get_grades($math_assignment, $sort, $sortdir, $groupmode, $currentgroup);
! if (!$students) {
! print_header("$course->shortname: $math_assignment->name", "$course->fullname",
! "$navigation <a href=\"index.php?id=$course->id\">$strmath_assignments</a> -> $math_assignment->name",
! "", "", true, update_module_button($cm->id, $course->id, $strmath_assignment), navmenu($course, $cm));
! print_heading(get_string("nostudentsyet"));
! print_footer($course);
! exit;
! }
}
else if ($isstudent) {
--- 116,131 ----
$strmath_assignments = get_string("modulenameplural", "math_assignment");
$strmath_assignment = get_string("modulename", "math_assignment");
+
+ /// Get student grades
! if ($isteacher) {
!
! // To save time only show the first 21 students unless they are all needed
! $tablelength = ($showgrades or $download) ? 999 : 10;
// Get a list of students for this course including grades
! // The following is necessary because of a bug in moodle, see http://moodle.org/bugs/bug.php?op=show&bugid=1169
! $group = ($currentgroup) ? $currentgroup : NULL;
! $students = math_assignment_get_grades($math_assignment, $sort, $sortdir, $group, 0, $tablelength);
}
else if ($isstudent) {
***************
*** 141,145 ****
}
! // OK, we have all the data, now present it to the user
if ($download == "xls" and $isteacher) {
--- 141,146 ----
}
! /// OK, we have all the data, now present it to the user
! /// First all the different ways of downloading the data
if ($download == "xls" and $isteacher) {
***************
*** 270,273 ****
--- 271,276 ----
exit;
+ /// Here we finally come to the webpage
+
} else { // Just print the web page
***************
*** 278,331 ****
print_heading($math_assignment->name, "center");
! $inbox = false;
$timedifference = $math_assignment->timedue - time();
! if ($timedifference < 31536000) { // Don't bother showing dates over a year in the future
! print_simple_box_start("center");
! $inbox = true;
! $strdifference = format_time($timedifference);
! if ($timedifference < 0) {
! $strdifference = "<font color=\"red\">- $strdifference</font>";
! }
! $strduedate = userdate($math_assignment->timedue)." ($strdifference)";
! echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";
}
$totalmax = $math_assignment->papergrade + $math_assignment->aimgrade;
if ($isstudent) {
! if (!$inbox) {
! print_simple_box_start("center");
! $inbox = true;
! }
! $pg = $grade->papergrade+0; // The +0 converts it into a number
! $pm = $math_assignment->papergrade+0;
! if ($math_assignment->papergrade > 0) {
! if ($grade->papergrade >= 0) {
! $pg = $grade->papergrade+0; // The +0 converts it into a number
! $pm = $math_assignment->papergrade+0;
! $papergrade = "<b>$pg / $pm</b>";
! } else if ($grade->papergrade = -1) {
! $papergrade = "<b>-- / $pm</b>";
! }
// display in grey if results have not been finalised
if (!$math_assignment->papersheetsreturned) {
$papergrade = "<span style=\"color: silver \">$papergrade</span>";
}
! // don't give results if assignment still open
! if ($math_assignment->timedue > time()) {
! $papergrade = $stropen;
! }
! }
! else {
! $papergrade = "";
}
! $ag = $grade->aimgrade+0; // The +0 converts it into a number
! $am = $math_assignment->aimgrade+0;
! if ($math_assignment->aimgrade > 0) {
! if ($grade->aimgrade >= 0) {
! $aimgrade = "<b>$ag / $am</b>";
! } else {
! $aimgrade = "<b>-- / $am</b>";
! }
// show aimgrade in grey if quiz has not closed yet
if ($math_assignment->timedue > time()) {
--- 281,322 ----
print_heading($math_assignment->name, "center");
! // At the top of the page there will be a box with the due date
! // and (if a student views it) a summary of the student's grades
! // and the description of the assignment (if any)
! print_simple_box_start("center");
!
! // Print due date
$timedifference = $math_assignment->timedue - time();
! $strdifference = format_time($timedifference);
! if ($timedifference < 0) {
! $strdifference = "<font color=\"red\">- $strdifference</font>";
}
+ $strduedate = userdate($math_assignment->timedue)." ($strdifference)";
+ echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";
$totalmax = $math_assignment->papergrade + $math_assignment->aimgrade;
+ // For student print summary of grades and teacher comments
if ($isstudent) {
!
! // if there is a paper component then print grade for that component
! if ($haspaper) {
! $pg = $grade->papergrade+0; // The +0 converts it into a number
! $pm = $math_assignment->papergrade+0;
! $papergrade = ($grade->papergrade >= 0) ? "<b>$pg / $pm</b>" : "<b>-- / $pm</b>";
// display in grey if results have not been finalised
if (!$math_assignment->papersheetsreturned) {
$papergrade = "<span style=\"color: silver \">$papergrade</span>";
}
! echo "<b>";
! if ($hasaim) echo "$strpaper ";
! echo "$strgrade:</b> $papergrade<br />";
}
!
! // if there is an AiM component then print grade for that component
! if ($hasaim) {
! $ag = $grade->aimgrade+0; // The +0 converts it into a number
! $am = $math_assignment->aimgrade+0;
! $aimgrade = ($grade->aimgrade >= 0) ? "<b>$ag / $am</b>" : "<b>-- / $am</b>";
// show aimgrade in grey if quiz has not closed yet
if ($math_assignment->timedue > time()) {
***************
*** 335,348 ****
$aimgrade .= " (" . get_string("gradeoverride", "math_assignment") . ")";
}
- }
- else {
- $aimgrade = "";
- }
- if ($haspaper) {
- echo "<b>";
- if ($hasaim) echo "$strpaper ";
- echo "$strgrade: $papergrade<br />";
- }
- if ($hasaim) {
echo "<b>$strcomputer $strgrade :</b> ";
echo "$aimgrade <br />";
--- 326,329 ----
***************
*** 351,390 ****
":</b> " . nl2br(htmlspecialchars($grade->aimcomment)) . "<br />";
}
if ($hasboth) {
! $totalgrade = math_assignment_total_grade($math_assignment, $grade);
! echo "<b>$strtotal $strgrade :</b> ";
! if ($totalgrade >= 0)
! echo " $totalgrade / $totalmax";
! else
! print_string("notmarked", "math_assignment");
}
}
echo format_text($math_assignment->description);
- if ($inbox)
- print_simple_box_end();
if ($isteacher) {
! $zonelink = "";
! if ($subject = get_record("math_assignment_subjects", "course", $course->id)) {
! if ($server = get_record("math_assignment_servers", "id", $subject->server))
! $zonelink = $server->password;
! }
! echo math_assignment_get_admin_links($cm, $math_assignment, $zonelink, "center");
! if ($showgrades) {
! echo "<center><a href=\"view.php?id=$cm->id\">$strhidegradestable</a></center>";
! } else {
! echo "<center><a href=\"view.php?id=$cm->id&showgrades=true\">$strshowgradestable</a></center>";
! }
}
! if ($isteacher and $showgrades) {
if ($groupmode == VISIBLEGROUPS or ($groupmode and isteacheredit($course->id))) {
if ($groups = get_records_menu("groups", "courseid", $course->id, "name ASC", "id,name")) {
echo '<td>';
! print_group_menu($groups, $groupmode, $currentgroup, "view.php?id=$cm->id&showgrades=true");
echo '</td>';
}
}
if ($hasboth) {
--- 332,372 ----
":</b> " . nl2br(htmlspecialchars($grade->aimcomment)) . "<br />";
}
+
if ($hasboth) {
! $tg = math_assignment_total_grade($math_assignment, $grade);
! $totalgrade = ($tg >= 0) ? "<b>$tg / $totalmax</b>" : "<b>-- / $totalmax</b>";
! if (($haspaper and !$math_assignment->papersheetsreturned) or ($math_assignment->timedue > time())) {
! $totalgrade = "<span style=\"color: silver \">$totalgrade</span>";
! }
! echo "<b>$strtotal $strgrade :</b> $totalgrade";
}
}
echo format_text($math_assignment->description);
+ print_simple_box_end();
+
+ //
if ($isteacher) {
! echo math_assignment_get_admin_links($cm, $math_assignment, "center");
}
+
+ /// For teacher print grades table
! if ($isteacher) {
+ // This groups code was copied from someshere else. It shows the groups selection menu
if ($groupmode == VISIBLEGROUPS or ($groupmode and isteacheredit($course->id))) {
if ($groups = get_records_menu("groups", "courseid", $course->id, "name ASC", "id,name")) {
echo '<td>';
! print_group_menu($groups, $groupmode, $currentgroup, "view.php?id=$cm->id");
echo '</td>';
}
}
+
+ if (!$students) {
+ notify(get_string("nostudents", 'math_assignment'));
+ print_footer($course);
+ exit;
+ }
if ($hasboth) {
***************
*** 401,417 ****
}
! $i = 1;
! foreach ($students as $key => $student) {
! $picture = print_user_picture($key, $course->id, $student->picture, false, true);
! if ($student->papergrade >= 0)
! $papergrade = $student->papergrade+0;
! else
! $papergrade = "";
! $papergrade = "<input type=\"text\" name=\"$student->userid\" size=\"4\" maxlength=\"10\" value=\"$papergrade\" tabindex=\"$i\" />";
! if ($student->aimgrade >= 0)
! $aimgrade = $student->aimgrade+0;
! else
! $aimgrade = "";
if (($student->aimoverride > AIMOVR_RESET) or $student->aimcomment) {
$edited = '<span style="color:red;">';
--- 383,396 ----
}
! if (!$showgrades) {
! echo "<center><b>$strtopten</b> (<a href=\"view.php?id=$cm->id&showgrades=true\">$strshowall</a>)</center><br />";
! }
+ $i = 1;
+ foreach ($students as $student) {
+ $picture = print_user_picture($student->id, $course->id, $student->picture, false, true);
+ $papergrade = ($student->papergrade >= 0) ? $student->papergrade+0 : '';
+ $papergrade = "<input type=\"text\" name=\"$student->id\" size=\"4\" maxlength=\"10\" value=\"$papergrade\" tabindex=\"$i\" />";
+ $aimgrade = ($student->aimgrade >= 0) ? $student->aimgrade+0 : '';
if (($student->aimoverride > AIMOVR_RESET) or $student->aimcomment) {
$edited = '<span style="color:red;">';
***************
*** 423,442 ****
}
$email = "<a href=\"mailto:$student->email\">";
! if ($CFG->math_assignment_default_email_host) {
! if (preg_match("/^(.*)@(.*)$/", $student->email, $matches)) {
! if (strcmp($matches[2], $CFG->math_assignment_default_email_host) == 0)
! $email .= "$matches[1]</a>";
! else
! $email .= "$student->email</a>";
! }
! else
! $email .= "$student->email</a>";
! }
! else
$email .= "$student->email</a>";
if ($hasboth)
$table->data[] = array($picture, $student->firstname, $student->lastname, $email, $papergrade,
! "$edited$aimgrade$editedclose <a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">
<img src=\"$CFG->pixpath/i/edit.gif\" alt\"$stredit\" border=\"0\"/></a>
<a href=\"aimpage.php?id=$cm->id&reviewstudent=$student->username&aimaction=reviewquiz\">
--- 402,418 ----
}
+ // Show email link. If it is an address on the default email host then simplify it
$email = "<a href=\"mailto:$student->email\">";
! if ($CFG->math_assignment_default_email_host and
! preg_match("/^(.*)@(.*)$/", $student->email, $matches) and
! (strcmp($matches[2], $CFG->math_assignment_default_email_host) == 0)) {
! $email .= "$matches[1]</a>";
! } else {
$email .= "$student->email</a>";
+ }
+
if ($hasboth)
$table->data[] = array($picture, $student->firstname, $student->lastname, $email, $papergrade,
! "$edited$aimgrade$editedclose <a href=\"editgrade.php?id=$math_assignment->id&userid=$student->id\">
<img src=\"$CFG->pixpath/i/edit.gif\" alt\"$stredit\" border=\"0\"/></a>
<a href=\"aimpage.php?id=$cm->id&reviewstudent=$student->username&aimaction=reviewquiz\">
***************
*** 446,450 ****
else if ($hasaim)
$table->data[] = array($picture, $student->firstname, $student->lastname, $email,
! "$edited$aimgrade$editedclose <a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">
<img src=\"$CFG->pixpath/i/edit.gif\" alt\"$stredit\" border=\"0\"/></a>
<a href=\"aimpage.php?id=$cm->id&reviewstudent=$student->username&aimaction=reviewquiz\">
--- 422,426 ----
else if ($hasaim)
$table->data[] = array($picture, $student->firstname, $student->lastname, $email,
! "$edited$aimgrade$editedclose <a href=\"editgrade.php?id=$math_assignment->id&userid=$student->id\">
<img src=\"$CFG->pixpath/i/edit.gif\" alt\"$stredit\" border=\"0\"/></a>
<a href=\"aimpage.php?id=$cm->id&reviewstudent=$student->username&aimaction=reviewquiz\">
***************
*** 495,499 ****
echo "</tr></table>";
! if ($adminlinks = math_assignment_get_admin_links($cm, $math_assignment, $zonelink, "center")) {
echo $adminlinks;
}
--- 471,475 ----
echo "</tr></table>";
! if ($adminlinks = math_assignment_get_admin_links($cm, $math_assignment, "center")) {
echo $adminlinks;
}
Index: aimpage.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/aimpage.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** aimpage.php 21 Mar 2004 11:42:27 -0000 1.24
--- aimpage.php 21 Mar 2004 15:33:49 -0000 1.25
***************
*** 272,276 ****
// write admin links
if (isteacher($course->id)) {
! echo math_assignment_get_admin_links($cm, $math_assignment, $server->password, "center");
echo "<center><a href=\"view.php?id=$cm->id&showgrades=true\">".get_string("showgradestable", "math_assignment").'</a></center>';
}
--- 272,276 ----
// write admin links
if (isteacher($course->id)) {
! echo math_assignment_get_admin_links($cm, $math_assignment, "center");
echo "<center><a href=\"view.php?id=$cm->id&showgrades=true\">".get_string("showgradestable", "math_assignment").'</a></center>';
}
***************
*** 311,315 ****
if (isteacher($course->id)) {
! if ($adminlinks = math_assignment_get_admin_links($cm, $math_assignment, $server->password, "center")) {
echo $adminlinks;
}
--- 311,315 ----
if (isteacher($course->id)) {
! if ($adminlinks = math_assignment_get_admin_links($cm, $math_assignment, "center")) {
echo $adminlinks;
}
|