Permalink
Browse files

Removal of diagnostic messages in Administration page; correction to

db/mysql.php
  • Loading branch information...
1 parent b7926af commit f47f90af64e5e3afd29b745a40331118b495d3e7 rkingdon committed Nov 17, 2003
Showing with 5 additions and 7 deletions.
  1. +1 −1 mod/exercise/db/mysql.php
  2. +4 −6 mod/exercise/lib.php
@@ -10,7 +10,7 @@ function exercise_upgrade($oldversion) {
execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_submissions` ADD INDEX (`userid`)");
execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_submissions` DROP INDEX `title`");
execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_assessments` ADD INDEX (`submissionid`)");
- execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_submissions` ADD INDEX (`userid`)");
+ execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_assessments` ADD INDEX (`userid`)");
execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_grades` ADD INDEX (`assessmentid`)");
}
View
@@ -1482,8 +1482,6 @@ function exercise_list_submissions_for_admin($exercise) {
print_table($table);
echo "<p align=\"center\">".get_string("noteonstudentassessments", "exercise")."</p>\n";
}
- $elapsed = time() - $timenow;
- echo "<p>Elapsed time: $elapsed\n";
}
// now the sudent submissions
@@ -1496,6 +1494,7 @@ function exercise_list_submissions_for_admin($exercise) {
$table->cellpadding = 2;
$table->cellspacing = 0;
+ $nsubmissions = 0;
foreach ($users as $user) {
if ($submissions = exercise_get_user_submissions($exercise, $user)) {
foreach ($submissions as $submission) {
@@ -1531,17 +1530,16 @@ function exercise_list_submissions_for_admin($exercise) {
$table->data[] = array("$user->firstname $user->lastname", $title.
" ".exercise_print_submission_assessments($exercise, $submission),
userdate($submission->timecreated), $action);
+ $nsubmissions++;
}
}
}
- print_heading(get_string("studentsubmissions", "exercise", $course->student)." [".
- count($submissions)."]", "center");
+ print_heading(get_string("studentsubmissions", "exercise", $course->student)." [$nsubmissions]",
+ "center");
print_table($table);
echo "<center><p>".get_string("resubmitnote", "exercise", $course->student)."</p>\n";
echo "<p>".get_string("allgradeshaveamaximumof", "exercise", $exercise->grade)."</p></center>\n";
}
- $elapsed = time() - $timenow;
- echo "<p>Elapsed time: $elapsed\n";
}

0 comments on commit f47f90a

Please sign in to comment.