[Aimmath-commit] moodle/mod/math_assignment index.php,1.1,1.2
Brought to you by:
gustav_delius,
npstrick
|
From: <ma...@us...> - 2003-09-11 20:50:43
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv27821/mod/math_assignment
Modified Files:
index.php
Log Message:
Bug fix - problems and solutions links were being displayed in the table on index.php even when there were none.
Also added the new columns (due time, problems, solutions) to the student view. I hope they have their screen resolution high! :-)
Index: index.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** index.php 9 Sep 2003 18:31:07 -0000 1.1
--- index.php 11 Sep 2003 20:50:40 -0000 1.2
***************
*** 46,49 ****
--- 46,54 ----
$strtopic = get_string("topic");
$strname = get_string("name");
+ $strtimedue = get_string("timedue", "math_assignment");
+ $strproblems = get_string("problems", "math_assignment");
+ $strsolutions = get_string("solutions", "math_assignment");
+ $strviewproblems = get_string("viewproblems", "math_assignment");
+ $strviewsolutions = get_string("viewsolutions", "math_assignment");
$strpaper = get_string("paper", "math_assignment");
$strcomputer = get_string("computer", "math_assignment");
***************
*** 61,69 ****
$showaim = true;
- $strtimedue = get_string("timedue", "math_assignment");
- $strproblems = get_string("problems", "math_assignment");
- $strsolutions = get_string("solutions", "math_assignment");
- $strviewproblems = get_string("viewproblems", "math_assignment");
- $strviewsolutions = get_string("viewsolutions", "math_assignment");
if ($showaim) {
$straimsubject = get_string("aimsubject", "math_assignment");
--- 66,69 ----
***************
*** 94,108 ****
if ($course->format == "weeks") {
! $table->head = array ($strweek, $strname, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("CENTER", "LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array (10, "*", "*", "*", "*");
} else if ($course->format == "topics") {
! $table->head = array ($strtopic, $strname, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("CENTER", "LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array (10, "*", "*", "*", "*");
} else {
! $table->head = array ($strname, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array ("*", "*", "*", "*");
}
}
--- 94,108 ----
if ($course->format == "weeks") {
! $table->head = array ($strweek, $strname, $strtimedue, $strproblems, $strsolutions, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("CENTER", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array (10, "*", "*", "*", "*", "*", "*", "*");
} else if ($course->format == "topics") {
! $table->head = array ($strtopic, $strname, $strtimedue, $strproblems, $strsolutions, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("CENTER", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array (10, "*", "*", "*", "*", "*", "*", "*");
} else {
! $table->head = array ($strname, $strtimedue, $strproblems, $strsolutions, "$strpaper $strgrade", "$strcomputer $strgrade", "$strtotal $strgrade");
! $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER", "CENTER");
! $table->width = array ("*", "*", "*", "*", "*", "*", "*");
}
}
***************
*** 118,123 ****
}
if ($teacher) {
- math_assignment_get_file_urls($course->id, $math_assignment, $proburl, $solurl);
if ($showaim) {
// lookup subject
--- 118,123 ----
}
+ math_assignment_get_file_urls($course->id, $math_assignment, $proburl, $solurl);
if ($teacher) {
if ($showaim) {
// lookup subject
***************
*** 137,141 ****
$row = array ($link);
}
! array_push($row, userdate($math_assignment->timedue, "", 99, false), "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>", "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>");
if ($showaim)
array_push($row, $subject->name, "$server->name ($server->address)");
--- 137,141 ----
$row = array ($link);
}
! array_push($row, userdate($math_assignment->timedue, "", 99, false), $math_assignment->problems ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $math_assignment->solutions ? "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>" : "");
if ($showaim)
array_push($row, $subject->name, "$server->name ($server->address)");
***************
*** 160,168 ****
if ($grade->aimoverride)
$aimgrade .= " (" . get_string("gradeoverride", "math_assignment") . ")";
! if ($course->format == "weeks" or $course->format == "topics") {
! $table->data[] = array ($math_assignment->section, $link, $papergrade, $aimgrade, math_assignment_total_grade($math_assignment, $grade) . " / $maxgrade");
! } else {
! $table->data[] = array ($link, $papergrade, $aimgrade);
}
}
}
--- 160,177 ----
if ($grade->aimoverride)
$aimgrade .= " (" . get_string("gradeoverride", "math_assignment") . ")";
! if ($course->format == "weeks" or $course->format == "topics")
! $row = array ($math_assignment->section, $link);
! else
! $row = array ($link);
! if ($math_assignment->solutions) {
! if ($timenow > $math_assignment->timedue)
! $solutions = "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>";
! else
! $solutions = "";
}
+ else
+ $solutions = "";
+ array_push($row, userdate($math_assignment->timedue, "", 99, false), $math_assignment->problems ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solutions, $papergrade, $aimgrade);
+ $table->data[] = $row;
}
}
|