Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added League Table of Submissions (Final Phase); Rubric Assessment

Strategy; Grace time for new submissions; changed elementid to elementno
in rubrics table.
  • Loading branch information...
commit a94928f2f0f3fff706d61b87529f0b3d334cd78b 1 parent eafc0b4
authored
136  mod/workshop/assessments.php
... ...
@@ -1,4 +1,4 @@
1  
-<?PHP  // $Id: lib.php,v 1.0 14 Aug 2003
  1
+<?PHP  // $Id: lib.php,v 1.1 22 Aug 2003
2 2
 
3 3
 /*************************************************
4 4
 	ACTIONS handled are:
@@ -315,6 +315,7 @@
315 315
 			if (!isset($elements[$i])) {
316 316
 				$elements[$i]->description = '';
317 317
 				$elements[$i]->scale =0;
  318
+				$elements[$i]->maxscore = 0;
318 319
 				$elements[$i]->weight = 11;
319 320
 				}
320 321
 			}
@@ -362,17 +363,6 @@
362 363
 				break;
363 364
 				
364 365
 			case 2: // error banded grading
365  
-				if ($elementsraw = get_records("workshop_elements", "workshopid", $workshop->id, "elementno ASC" )) {
366  
-					foreach ($elementsraw as $element) {
367  
-						$elements[] = $element;   // to renumber index 0,1,2...
368  
-						}
369  
-					}
370  
-				else { // set up the elements array with default values
371  
-					for ($i=0; $i<=$workshop->nelements; $i++) {
372  
-						$elements[$i]->description = '';
373  
-						$elements[$i]->maxscore =0;
374  
-						}
375  
-					}
376 366
 				for ($i=0; $i<$workshop->nelements; $i++) {
377 367
 					$iplus1 = $i+1;
378 368
 					echo "<TR valign=top>\n";
@@ -401,24 +391,17 @@
401 391
 					}
402 392
 				for ($i=0; $i<=$workshop->nelements; $i++) {
403 393
 					echo "<TR><TD ALIGN=\"CENTER\">$i</TD><TD ALIGN=\"CENTER\">";
  394
+					if (!isset($elements[$i])) {  // the "last one" will be!
  395
+						$elements[$i]->description = "";
  396
+						$elements[$i]->maxscore = 0;
  397
+						}
404 398
 					choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, "");
405 399
 					echo "</TD></TR>\n";
406 400
 					}
407 401
 				echo "</TABLE></CENTER>\n";
408 402
 				break;
409 403
 				
410  
-			case 3: // criteria grading
411  
-				if ($elementsraw = get_records("workshop_elements", "workshopid", $workshop->id, "elementno ASC" )) {
412  
-					foreach ($elementsraw as $element) {
413  
-						$elements[] = $element;   // to renumber index 0,1,2...
414  
-						}
415  
-					}
416  
-				else { // set up the elements array with default values
417  
-					for ($i=0; $i<=$workshop->nelements; $i++) {
418  
-						$elements[$i]->description = '';
419  
-						$elements[$i]->maxscore =0;
420  
-						}
421  
-					}
  404
+			case 3: // criterion grading
422 405
 				for ($j = 100; $j >= 0; $j--) {
423 406
 					$numbers[$j] = $j;
424 407
 					}
@@ -436,6 +419,42 @@
436 419
 					echo "</TR>\n";
437 420
 					}
438 421
 				break;
  422
+
  423
+			case 4: // rubric
  424
+				for ($j = 100; $j >= 0; $j--) {
  425
+					$numbers[$j] = $j;
  426
+					}
  427
+				if ($rubricsraw = get_records("workshop_rubrics", "workshopid", $workshop->id)) {
  428
+					foreach ($rubricsraw as $rubric) {
  429
+						$rubrics[$rubric->elementno][$rubric->rubricno] = $rubric->description;   // reindex 0,1,2...
  430
+						}
  431
+					}
  432
+				for ($i=0; $i<$workshop->nelements; $i++) {
  433
+					$iplus1 = $i+1;
  434
+					echo "<TR valign=top>\n";
  435
+					echo "	<TD ALIGN=RIGHT><P><B>". get_string("element","workshop")." $iplus1:</B></TD>\n";
  436
+					echo "<TD><textarea name=\"description[$i]\" rows=3 cols=75 wrap=\"virtual\">".$elements[$i]->description."</textarea>\n";
  437
+					echo "	</TD></TR>\n";
  438
+					echo "<TR valign=top><TD ALIGN=RIGHT><B>".get_string("elementweight", "workshop").":</B></TD><TD>\n";
  439
+					workshop_choose_from_menu($WORKSHOP_EWEIGHTS, "weight[]", $elements[$i]->weight, "");
  440
+					echo "		</TD>\n";
  441
+					echo "</TR>\n";
  442
+
  443
+					for ($j=0; $j<5; $j++) {
  444
+						$jplus1 = $j+1;
  445
+						if (empty($rubrics[$i][$j])) {
  446
+							$rubrics[$i][$j] = "";
  447
+							}
  448
+						echo "<TR valign=top>\n";
  449
+						echo "	<TD ALIGN=RIGHT><P><B>". get_string("grade","workshop")." $j:</B></TD>\n";
  450
+						echo "<TD><textarea name=\"rubric[$i][$j]\" rows=3 cols=75 wrap=\"virtual\">".$rubrics[$i][$j]."</textarea>\n";
  451
+						echo "	</TD></TR>\n";
  452
+						}
  453
+					echo "<TR valign=top>\n";
  454
+					echo "	<TD colspan=2 BGCOLOR=\"$THEME->cellheading2\">&nbsp;</TD>\n";
  455
+					echo "</TR>\n";
  456
+					}
  457
+				break;
439 458
 			}
440 459
 		// close table and form
441 460
 		?>
@@ -471,7 +490,7 @@
471 490
 			}
472 491
 		// get the teacher's assessment first
473 492
 		if ($teachersassessment = workshop_get_submission_assessment($submission, $USER)) {
474  
-			echo "<P><CENTER><B>".get_string("teachersassessment", "workshop")."</B></CENTER>\n";
  493
+			echo "<P><CENTER><B>".get_string("teacherassessments", "workshop", $course->teacher)."</B></CENTER>\n";
475 494
 			workshop_print_assessment($workshop, $teachersassessment);
476 495
 			}
477 496
 		// now the student's assessment (don't allow changes)
@@ -590,7 +609,7 @@
590 609
 				break;
591 610
 				
592 611
 			case 2: // error banded grading...
593  
-			case 3: // ...and criteria grading
  612
+			case 3: // ...and criterion grading
594 613
 				// Insert all the elements that contain something, the number of descriptions is one less than the number of grades
595 614
 				foreach ($form->maxscore as $key => $themaxscore) {
596 615
 					unset($element);
@@ -608,6 +627,42 @@
608 627
 						}
609 628
 					}
610 629
 				break;
  630
+				
  631
+			case 4: // ...and criteria grading
  632
+				// Insert all the elements that contain something
  633
+				foreach ($form->description as $key => $description) {
  634
+					unset($element);
  635
+					$element->workshopid = $workshop->id;
  636
+					$element->elementno = $key;
  637
+					$element->description   = $description;
  638
+					$element->weight = $form->weight[$key];
  639
+					for ($j=0;$j<5;$j++) {
  640
+						if (empty($form->rubric[$key][$j]))
  641
+							break;
  642
+						}
  643
+					$element->maxscore = $j - 1;
  644
+					if (!$element->id = insert_record("workshop_elements", $element)) {
  645
+						error("Could not insert workshop element!");
  646
+						}
  647
+					}
  648
+				// let's not fool around here, dump the junk!
  649
+				delete_records("workshop_rubrics", "workshopid", $workshop->id);
  650
+				for ($i=0;$i<$workshop->nelements;$i++) {
  651
+					for ($j=0;$j<5;$j++) {
  652
+						unset($element);
  653
+						if (empty($form->rubric[$i][$j])) {  // OK to have an element with fewer than 5 items
  654
+							 break;
  655
+							 }
  656
+						$element->workshopid = $workshop->id;
  657
+						$element->elementno = $i;
  658
+						$element->rubricno = $j;
  659
+						$element->description   = $form->rubric[$i][$j];
  660
+						if (!$element->id = insert_record("workshop_rubrics", $element)) {
  661
+							error("Could not insert workshop element!");
  662
+							}
  663
+						}
  664
+					}
  665
+				break;
611 666
 			} // end of switch
612 667
 
613 668
 		echo "<P>\n";
@@ -766,6 +821,35 @@
766 821
 					error("Could not insert workshop element!");
767 822
 					}
768 823
 				$grade = ($elements[$form->grade[0]]->maxscore + $form->grade[1]) * $workshop->grade / 100;
  824
+				break;
  825
+
  826
+			case 4: // rubric grading (identical to accumulative grading)
  827
+				// Insert all the elements that contain something
  828
+				foreach ($form->grade as $key => $thegrade) {
  829
+					unset($element);
  830
+					$element->workshopid = $workshop->id;
  831
+					$element->assessmentid = $assessment->id;
  832
+					$element->elementno = $key;
  833
+					$element->feedback   = $form->feedback[$key];
  834
+					$element->grade = $thegrade;
  835
+					if (!$element->id = insert_record("workshop_grades", $element)) {
  836
+						error("Could not insert workshop element!");
  837
+						}
  838
+					}
  839
+				// now work out the grade...
  840
+				$rawgrade=0;
  841
+				$totalweight=0;
  842
+				foreach ($form->grade as $key => $grade) {
  843
+					$maxscore = $elements[$key]->maxscore;
  844
+					$weight = $WORKSHOP_EWEIGHTS[$elements[$key]->weight];
  845
+					if ($weight > 0) { 
  846
+						$totalweight += $weight;
  847
+						}
  848
+					$rawgrade += ($grade / $maxscore) * $weight;
  849
+					}
  850
+				$grade = $workshop->grade * ($rawgrade / $totalweight);
  851
+				break;
  852
+
769 853
 			} // end of switch
770 854
 			
771 855
 		// update the time of the assessment record (may be re-edited)...
7  mod/workshop/db/mysql.php
@@ -45,6 +45,13 @@ function workshop_upgrade($oldversion) {
45 45
         ");
46 46
         
47 47
 		}
  48
+		
  49
+	if ($oldversion < 2003082200) {
  50
+	
  51
+		execute_sql(" ALTER TABLE `{$CFG->prefix}workshop_rubrics` CHANGE `elementid` `elementno` INT(10) UNSIGNED NOT NULL DEFAULT '0'");
  52
+		
  53
+		}
  54
+		
48 55
     return true;
49 56
 }
50 57
 
2  mod/workshop/db/mysql.sql
@@ -101,7 +101,7 @@ CREATE TABLE `prefix_workshop_elements` (
101 101
 CREATE TABLE `prefix_workshop_rubrics` (
102 102
   `id` int(10) unsigned NOT NULL auto_increment,
103 103
   `workshopid` int(10) unsigned NOT NULL default '0',
104  
-  `elementid` int(10) unsigned NOT NULL default '0',
  104
+  `elementno` int(10) unsigned NOT NULL default '0',
105 105
   `rubricno` tinyint(3) unsigned NOT NULL default '0',
106 106
   `description` text NOT NULL,
107 107
   PRIMARY KEY  (`id`)
184  mod/workshop/lib.php
... ...
@@ -1,4 +1,4 @@
1  
-<?PHP  // $Id: lib.php,v 1.1 21 Aug 2003
  1
+<?PHP  // $Id: lib.php,v 1.1 22 Aug 2003
2 2
 
3 3
 include_once("$CFG->dirroot/files/mimetypes.php");
4 4
 
@@ -9,7 +9,8 @@
9 9
 $WORKSHOP_TYPE = array (0 => get_string("notgraded", "workshop"),
10 10
                           1 => get_string("accumulative", "workshop"),
11 11
                           2 => get_string("errorbanded", "workshop"),
12  
-                          3 => get_string("criteria", "workshop") );
  12
+                          3 => get_string("criterion", "workshop"),
  13
+						  4 => get_string("rubric", "workshop") );
13 14
 
14 15
 $WORKSHOP_SHOWGRADES = array (0 => get_string("dontshowgrades", "workshop"),
15 16
                           1 => get_string("showgrades", "workshop") );
@@ -29,7 +30,7 @@
29 30
 $WORKSHOP_EWEIGHTS = array(  0 => -4.0, 1 => -2.0, 2 => -1.5, 3 => -1.0, 4 => -0.75, 5 => -0.5,  6 => -0.25, 
30 31
 											7 => 0.0, 8 => 0.25, 9 => 0.5, 10 => 0.75, 11=> 1.0, 12 => 1.5, 13=> 2.0, 14 => 4.0); 
31 32
 
32  
-$WORKSHOP_FWEIGHTS = array(  0 => 0, 1 => 0.1, 2 => 0.25, 3 => 0.5, 4 => 0.75, 5 => 1,  6 => 1.5, 
  33
+$WORKSHOP_FWEIGHTS = array(  0 => 0, 1 => 0.1, 2 => 0.25, 3 => 0.5, 4 => 0.75, 5 => 1.0,  6 => 1.5, 
33 34
 											7 => 2.0, 8 => 3.0, 9 => 5.0, 10 => 7.5, 11=> 10.0); 
34 35
 
35 36
 if (!defined("COMMENTSCALE")) {
@@ -702,6 +703,7 @@ function workshop_print_assessments_by_user_for_admin($workshop, $user) {
702 703
 function workshop_print_assessments_for_admin($workshop, $submission) {
703 704
 function workshop_print_difference($time) {
704 705
 function workshop_print_feedback($course, $submission) {
  706
+function workshop_print_league_table($workshop) {
705 707
 function workshop_print_submission_assessments($workshop, $submission, $type) {
706 708
 function workshop_print_submission_title($workshop, $user) {
707 709
 function workshop_print_tabbed_table($table) {
@@ -1074,7 +1076,10 @@ function workshop_get_student_submissions($workshop, $order = "title") {
1074 1076
 	if ($order == "name") {
1075 1077
 		$order = "a.firstname, a.lastname";
1076 1078
 		}
1077  
-    return get_records_sql("SELECT s.* FROM {$CFG->prefix}workshop_submissions s, {$CFG->prefix}user_students u,
  1079
+	if ($order == "grade") {
  1080
+		$order = "$workshop->teacherweight * s.teachergrade + $workshop->peerweight * s.peergrade DESC";
  1081
+		}
  1082
+	return get_records_sql("SELECT s.* FROM {$CFG->prefix}workshop_submissions s, {$CFG->prefix}user_students u,
1078 1083
 							{$CFG->prefix}user a 
1079 1084
                             WHERE u.course = $workshop->course
1080 1085
                               AND s.userid = u.userid
@@ -1644,7 +1649,7 @@ function workshop_list_submissions_for_admin($workshop, $order) {
1644 1649
 						$title .= " {-";
1645 1650
 						}
1646 1651
 					if ($assessment->timegraded) {
1647  
-						$title .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE,0)."%";
  1652
+						$title .= "/".number_format($assessment->gradinggrade * 100 / COMMENTSCALE, 0)."%";
1648 1653
 						}
1649 1654
 					$title .= "} ";
1650 1655
 					if ($realassessments = workshop_count_user_assessments_done($workshop, $user)) {
@@ -1976,6 +1981,9 @@ function workshop_list_ungraded_assessments($workshop, $stype) {
1976 1981
 	
1977 1982
 
1978 1983
 function workshop_list_user_submissions($workshop, $user) {
  1984
+	global $CFG;
  1985
+
  1986
+	$timenow = time();
1979 1987
 	$table->head = array (get_string("title", "workshop"),  get_string("action", "workshop"),
1980 1988
 		get_string("submitted", "assignment"),  get_string("assessments", "workshop"));
1981 1989
 	$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT");
@@ -1985,8 +1993,8 @@ function workshop_list_user_submissions($workshop, $user) {
1985 1993
 
1986 1994
 	if ($submissions = workshop_get_user_submissions($workshop, $user)) {
1987 1995
 		foreach ($submissions as $submission) {
1988  
-			// allow user to delete submissions if there is more than one submission 
1989  
-			if (count($submissions) > 1) {
  1996
+			// allow user to delete submissions if there is more than one submission or if it's fresh
  1997
+			if ((count($submissions) > 1) or (($timenow - $submission->timecreated) < $CFG->maxeditingtime)) {
1990 1998
 				$action = "<a href=\"submissions.php?action=userconfirmdelete&a=$workshop->id&sid=$submission->id\">".
1991 1999
 					get_string("delete", "workshop")."</a>";
1992 2000
 				}
@@ -2093,7 +2101,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
2093 2101
 		// only show the grade if grading strategy > 0 and the grade is positive
2094 2102
 		if ($showgrades and $assessment->grade >= 0) { 
2095 2103
 			echo "<CENTER><B>".get_string("thegradeis", "workshop").": ".number_format($assessment->grade, 2)."% (".
2096  
-				get_string("maximumgrade")." ".number_format($workshop->grade)."%)</B></CENTER><BR CLEAR=ALL>\n";
  2104
+				get_string("maximumgrade")." ".number_format($workshop->grade, 0)."%)</B></CENTER><BR CLEAR=ALL>\n";
2097 2105
 			}
2098 2106
 		}
2099 2107
 		
@@ -2177,7 +2185,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
2177 2185
 				echo "	<TD align=right><P><B>". get_string("element","workshop")." $iplus1:</B></P></TD>\n";
2178 2186
 				echo "	<TD>".text_to_html($elements[$i]->description);
2179 2187
 				echo "<P align=right><FONT size=1>Weight: "
2180  
-					.number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight],2)."</FONT>\n";
  2188
+					.number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
2181 2189
 				echo "</TD></TR>\n";
2182 2190
 				if ($showgrades) {
2183 2191
 					echo "<TR valign=top>\n";
@@ -2259,7 +2267,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
2259 2267
 				echo "	<TD align=right><P><B>". get_string("element","workshop")." $iplus1:</B></P></TD>\n";
2260 2268
 				echo "	<TD>".text_to_html($elements[$i]->description);
2261 2269
 				echo "<P align=right><FONT size=1>Weight: "
2262  
-					.number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight],2)."</FONT>\n";
  2270
+					.number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</FONT>\n";
2263 2271
 				echo "</TD></TR>\n";
2264 2272
 				echo "<TR valign=top>\n";
2265 2273
 				echo "	<TD align=right><P><B>". get_string("grade"). ":</B></P></TD>\n";
@@ -2407,12 +2415,71 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
2407 2415
 				choose_from_menu($numbers, "grade[1]", 0, "");
2408 2416
 				}
2409 2417
 			echo "</TD></TR>\n";
  2418
+			break;
  2419
+			
  2420
+		case 4: // rubric grading
  2421
+			// now run through the elements...
  2422
+			for ($i=0; $i < count($elements); $i++) {
  2423
+				$iplus1 = $i+1;
  2424
+				echo "<TR valign=\"top\">\n";
  2425
+				echo "<TD align=\"right\"><b>".get_string("element", "workshop")." $iplus1:</b></TD>\n";
  2426
+				echo "<TD>".text_to_html($elements[$i]->description).
  2427
+					 "<P align=\"right\"><font size=\"1\">Weight: "
  2428
+					.number_format($WORKSHOP_EWEIGHTS[$elements[$i]->weight], 2)."</font></TD></tr>\n";
  2429
+				echo "<TR valign=\"top\">\n";
  2430
+				echo "	<TD BGCOLOR=\"$THEME->cellheading2\" align=\"center\"><B>".get_string("select", "workshop")."</B></TD>\n";
  2431
+				echo "	<TD BGCOLOR=\"$THEME->cellheading2\"><B>". get_string("criterion","workshop")."</B></TD></tr>\n";
  2432
+				if (isset($grades[$i])) {
  2433
+					$selection = $grades[$i]->grade;
  2434
+					} else {
  2435
+					$selection = 0;
  2436
+					}
  2437
+				// ...and the rubrics
  2438
+				if ($rubricsraw = get_records_select("workshop_rubrics", "workshopid = $workshop->id AND 
  2439
+						elementno = $i", "rubricno ASC")) {
  2440
+					unset($rubrics);
  2441
+					foreach ($rubricsraw as $rubic) {
  2442
+						$rubrics[] = $rubic;   // to renumber index 0,1,2...
  2443
+						}
  2444
+					for ($j=0; $j<5; $j++) {
  2445
+						if (empty($rubrics[$j]->description)) {
  2446
+							break; // out of inner for loop
  2447
+							}
  2448
+						echo "<TR valign=top>\n";
  2449
+						if ($selection == $j) {
  2450
+							echo "	<TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\" CHECKED></TD>\n";
  2451
+							}else {
  2452
+							echo "	<TD align=center><INPUT TYPE=\"RADIO\" NAME=\"grade[$i]\" VALUE=\"$j\"></TD>\n";
  2453
+							}
  2454
+						echo "<TD>".text_to_html($rubrics[$j]->description)."</TD>\n";
  2455
+						}
  2456
+					echo "<TR valign=top>\n";
  2457
+					echo "	<TD align=right><P><B>". get_string("feedback").":</B></P></TD>\n";
  2458
+					echo "	<TD>\n";
  2459
+					if ($allowchanges) {
  2460
+						echo "		<textarea name=\"feedback[]\" rows=3 cols=75 wrap=\"virtual\">\n";
  2461
+						if (isset($grades[$i]->feedback)) {
  2462
+							echo $grades[$i]->feedback;
  2463
+							}
  2464
+						echo "</textarea>\n";
  2465
+						}
  2466
+					else {
  2467
+						echo text_to_html($grades[$i]->feedback);
  2468
+						}
  2469
+					echo "	</td>\n";
  2470
+					echo "</tr>\n";
  2471
+					echo "<tr valign=\"top\">\n";
  2472
+					echo "	<td colspan=\"2\" bgcolor=\"$THEME->cellheading2\">&nbsp;</TD>\n";
  2473
+					echo "</tr>\n";
  2474
+					}
  2475
+				}
  2476
+			break;
2410 2477
 		} // end of outer switch
2411 2478
 	
2412 2479
 	// now get the general comment (present in all types)
2413  
-	echo "<TR valign=top>\n";
2414  
-	echo "	<TD align=right><P><B>". get_string("generalcomment", "workshop").":</B></P></TD>\n";
2415  
-	echo "	<TD>\n";
  2480
+	echo "<tr valign=\"top\">\n";
  2481
+	echo "	<td align=\"right\"><P><B>". get_string("generalcomment", "workshop").":</B></P></TD>\n";
  2482
+	echo "	<td>\n";
2416 2483
 	if ($allowchanges) {
2417 2484
 		echo "		<textarea name=\"generalcomment\" rows=5 cols=75 wrap=\"virtual\">\n";
2418 2485
 		if (isset($assessment->generalcomment)) {
@@ -2430,53 +2497,53 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
2430 2497
 			print_string("yourfeedbackgoeshere", "workshop");
2431 2498
 			}
2432 2499
 		}
2433  
-	echo "&nbsp;</TD>\n";
2434  
-	echo "</TR>\n";
2435  
-	echo "<TR valign=top>\n";
2436  
-	echo "	<TD colspan=2 BGCOLOR=\"$THEME->cellheading2\">&nbsp;</TD>\n";
2437  
-	echo "</TR>\n";
  2500
+	echo "&nbsp;</td>\n";
  2501
+	echo "</tr>\n";
  2502
+	echo "<tr valign=\"top\">\n";
  2503
+	echo "	<td colspan=\"2\" bgcolor=\"$THEME->cellheading2\">&nbsp;</TD>\n";
  2504
+	echo "</tr>\n";
2438 2505
 	
2439 2506
 	$timenow = time();
2440 2507
 	// now show the teacher's comment if available...
2441 2508
 	if ($assessment->timegraded and (($timenow - $assessment->timegraded) > $CFG->maxeditingtime)) {
2442  
-		echo "<TR valign=top>\n";
2443  
-		echo "	<TD align=right><P><B>". get_string("teacherscomment", "workshop").":</B></P></TD>\n";
2444  
-		echo "	<TD>\n";
  2509
+		echo "<tr valign=top>\n";
  2510
+		echo "	<td align=\"right\"><p><b>". get_string("teacherscomment", "workshop").":</b></p></td>\n";
  2511
+		echo "	<td>\n";
2445 2512
 		echo text_to_html($assessment->teachercomment);
2446  
-		echo "&nbsp;</TD>\n";
2447  
-		echo "</TR>\n";
  2513
+		echo "&nbsp;</td>\n";
  2514
+		echo "</tr>\n";
2448 2515
 		// only show the grading grade if it's the teacher
2449 2516
 		if (isteacher($course->id)) {
2450  
-			echo "<TR valign=top>\n";
2451  
-			echo "	<TD align=right><P><B>". get_string("teachersgrade", "workshop").":</B></P></TD>\n";
2452  
-			echo "	<TD>\n";
2453  
-			echo number_format($assessment->gradinggrade*100/COMMENTSCALE,0)."%";
2454  
-			echo "&nbsp;</TD>\n";
  2517
+			echo "<tr valign=\"top\">\n";
  2518
+			echo "	<td align=\"right\"><p><b>". get_string("teachersgrade", "workshop").":</b></p></td>\n";
  2519
+			echo "	<td>\n";
  2520
+			echo number_format($assessment->gradinggrade * 100 / COMMENTSCALE, 0)."%";
  2521
+			echo "&nbsp;</td>\n";
  2522
+			echo "</tr>\n";
2455 2523
 			}
2456  
-		echo "</TR>\n";
2457  
-		echo "<TR valign=top>\n";
2458  
-		echo "	<TD colspan=2 BGCOLOR=\"$THEME->cellheading2\">&nbsp;</TD>\n";
2459  
-		echo "</TR>\n";
  2524
+		echo "<tr valign=\"top\">\n";
  2525
+		echo "<td colspan=\"2\" bgcolor=\"$THEME->cellheading2\">&nbsp;</td>\n";
  2526
+		echo "</tr>\n";
2460 2527
 		}
2461 2528
 		
2462 2529
 	// ...and close the table, show submit button if needed...
2463  
-	echo "</TABLE>\n";
  2530
+	echo "</table>\n";
2464 2531
 	if ($assessment) {
2465 2532
 		if ($allowchanges) {  
2466  
-			echo "<INPUT TYPE=\"submit\" VALUE=\"".get_string("savemyassessment", "workshop")."\">\n";
  2533
+			echo "<input type=\"submit\" VALUE=\"".get_string("savemyassessment", "workshop")."\">\n";
2467 2534
 			}
2468 2535
 		// ...if user is author, assessment not agreed, there's no comments, the showcommentlinks flag is set and 
2469 2536
 		// it's not self assessment then show some buttons!
2470 2537
 		if (($submission->userid == $USER->id) and !$assessment->timeagreed and !$comments and $showcommentlinks and 
2471 2538
 				$submission->userid != $assessment->userid) {
2472  
-			echo "<INPUT TYPE=button VALUE=\"".get_string("agreetothisassessment", "workshop")."\" 
2473  
-				ONCLICK=\"document.assessmentform.action.value='agreeassessment';document.assessmentform.submit();\">\n";
2474  
-			echo "<INPUT TYPE=submit VALUE=\"".get_string("disagreewiththisassessment", "workshop")."\"
2475  
-				ONCLICK=\"document.assessmentform.action.value='addcomment';document.assessmentform.submit();\">\n";
  2539
+			echo "<input type=button VALUE=\"".get_string("agreetothisassessment", "workshop")."\" 
  2540
+				onclick=\"document.assessmentform.action.value='agreeassessment';document.assessmentform.submit();\">\n";
  2541
+			echo "<input type=submit value=\"".get_string("disagreewiththisassessment", "workshop")."\"
  2542
+				onclick=\"document.assessmentform.action.value='addcomment';document.assessmentform.submit();\">\n";
2476 2543
 			}
2477 2544
 		}
2478  
-	echo "</CENTER>";
2479  
-	echo "</FORM>\n";
  2545
+	echo "</center>";
  2546
+	echo "</form>\n";
2480 2547
 	}
2481 2548
 
2482 2549
 
@@ -2553,6 +2620,36 @@ function workshop_print_feedback($course, $submission) {
2553 2620
 }
2554 2621
 
2555 2622
 
  2623
+function workshop_print_league_table($workshop) {
  2624
+	// print an order table of (student) submissions showing teacher's and student's assessments
  2625
+	if (! $course = get_record("course", "id", $workshop->course)) {
  2626
+		error("Print league table: Course is misconfigured");
  2627
+	}
  2628
+	$table->head = array (get_string("title", "workshop"),  get_string("name"),
  2629
+		get_string("teacherassessments", "workshop", $course->teacher),  
  2630
+		get_string("studentassessments", "workshop",	$course->student), get_string("overallgrade", "workshop"));
  2631
+	$table->align = array ("left", "left", "center", "center", "center");
  2632
+	$table->size = array ("*", "*", "*", "*", "*");
  2633
+	$table->cellpadding = 2;
  2634
+	$table->cellspacing = 0;
  2635
+
  2636
+	if ($submissions = workshop_get_student_submissions($workshop, "grade")) {
  2637
+		foreach ($submissions as $submission) {
  2638
+			if (!$user = get_record("user", "id", $submission->userid)) {
  2639
+				error("Print league table: user not found");
  2640
+				}
  2641
+			$table->data[] = array(workshop_print_submission_title($workshop, $submission), $user->firstname." ".
  2642
+				$user->lastname, workshop_print_submission_assessments($workshop, $submission, "teacher"),
  2643
+				workshop_print_submission_assessments($workshop, $submission, "student"),
  2644
+				number_format(($workshop->teacherweight * $submission->teachergrade + $workshop->peerweight *
  2645
+					$submission->peergrade) / ($workshop->teacherweight + $workshop->peerweight), 1)) ;
  2646
+			}
  2647
+		print_heading(get_string("leaguetable", "workshop"));
  2648
+		print_table($table);
  2649
+		}
  2650
+	}
  2651
+	
  2652
+
2556 2653
 function workshop_print_submission_assessments($workshop, $submission, $type) {
2557 2654
 	// Returns the teacher or peer grade and a hyperlinked list of grades for this submission
2558 2655
 	
@@ -2568,7 +2665,7 @@ function workshop_print_submission_assessments($workshop, $submission, $type) {
2568 2665
 						$str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">[";
2569 2666
 						$str .= number_format($assessment->grade, 0)."%";
2570 2667
 						if ($assessment->gradinggrade) { // funny, teacher is grading self!
2571  
-							$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE,0)."%";
  2668
+							$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE, 0)."%";
2572 2669
 							}
2573 2670
 						$str .= "]</A> ";
2574 2671
 						}
@@ -2583,7 +2680,7 @@ function workshop_print_submission_assessments($workshop, $submission, $type) {
2583 2680
 						$str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">{";
2584 2681
 						$str .= number_format($assessment->grade, 0)."%";
2585 2682
 						if ($assessment->gradinggrade) {
2586  
-							$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE,0)."%";
  2683
+							$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE, 0)."%";
2587 2684
 							}
2588 2685
 						$str .= "}</A> ";
2589 2686
 						}
@@ -2591,6 +2688,9 @@ function workshop_print_submission_assessments($workshop, $submission, $type) {
2591 2688
 				break;
2592 2689
 			}
2593 2690
 		}
  2691
+	if (!$str) {
  2692
+		$str = "&nbsp;";   // be kind to Mozilla browsers!
  2693
+		}
2594 2694
     return $str;
2595 2695
 }
2596 2696
 
68  mod/workshop/submissions.php
... ...
@@ -1,4 +1,4 @@
1  
-<?PHP  // $Id: lib.php,v 1.0 14 Aug 2003
  1
+<?PHP  // $Id: lib.php,v 1.1 22 Aug 2003
2 2
 
3 3
 /*************************************************
4 4
 	ACTIONS handled are:
@@ -688,72 +688,74 @@
688 688
 		
689 689
 		// show the final grades as stored in the tables...
690 690
 		print_heading_with_help(get_string("displayoffinalgrades", "workshop"), "finalgrades", "workshop");
691  
-		echo "<CENTER><TABLE BORDER=1 WIDTH=\"90%\"><TR>
692  
-			<TD BGCOLOR=\"$THEME->cellheading2\"><B>".$course->student."</B></TD>";
693  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("submissions", "workshop")."</B></TD>";
  691
+		echo "<center><table border=\"1\" width=\"90%\"><tr>
  692
+			<td bgcolor=\"$THEME->cellheading2\"><b>".$course->student."</b></td>";
  693
+		echo "<td bgcolor=\"$THEME->cellheading2\"><b>".get_string("submissions", "workshop")."</b></td>";
694 694
 		if ($useteachersgrades) {
695  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("assessmentsby", "workshop", $course->teachers)."</B></TD>";
  695
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("assessmentsby", "workshop", $course->teachers)."</b></td>";
696 696
 			}
697 697
 		if ($usepeergrades) {
698  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("assessmentsby", "workshop", $course->students)."</B></TD>";
  698
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("assessmentsby", "workshop", $course->students)."</b></td>";
699 699
 			}
700  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("assessmentsdone", "workshop")."</B></TD>";
  700
+		echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("assessmentsdone", "workshop")."</b></td>";
701 701
 		if ($usebiasgrades) {
702  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("gradeforbias", "workshop")."</B></TD>";
  702
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforbias", "workshop")."</b></td>";
703 703
 			}
704 704
 		if ($usereliabilitygrades) {
705  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("gradeforreliability", "workshop")."</B></TD>";
  705
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforreliability", "workshop")."</b></td>";
706 706
 			}
707 707
 		if ($usegradinggrades) {
708  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("gradeforassessments", "workshop")."</B></TD>";
  708
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("gradeforassessments", "workshop")."</b></td>";
709 709
 			}
710  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("overallgrade", "workshop")."</B></TD></TR>\n";
  710
+		echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>".get_string("overallgrade", "workshop")."</b></td></TR>\n";
711 711
 		// now the weights
712  
-		echo "<TR><TD BGCOLOR=\"$THEME->cellheading2\"><B>".get_string("weights", "workshop")."</B></TD>";
713  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>&nbsp;</B></TD>\n";
  712
+		echo "<TR><td bgcolor=\"$THEME->cellheading2\"><b>".get_string("weights", "workshop")."</b></td>";
  713
+		echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>&nbsp;</b></td>\n";
714 714
 		if ($useteachersgrades) {
715  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>$WORKSHOP_FWEIGHTS[$teacherweight]</B></TD>\n";
  715
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$WORKSHOP_FWEIGHTS[$teacherweight]</b></td>\n";
716 716
 			}
717 717
 		if ($usepeergrades) {
718  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>$WORKSHOP_FWEIGHTS[$peerweight]</B></TD>\n";
  718
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$WORKSHOP_FWEIGHTS[$peerweight]</b></td>\n";
719 719
 			}
720  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>&nbsp;</B></TD>\n";
  720
+		echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>&nbsp;</b></td>\n";
721 721
 		if ($usebiasgrades) {
722  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>$WORKSHOP_FWEIGHTS[$biasweight]</B></TD>\n";
  722
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$WORKSHOP_FWEIGHTS[$biasweight]</b></td>\n";
723 723
 			}
724 724
 		if ($usereliabilitygrades) {
725  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>$WORKSHOP_FWEIGHTS[$reliabilityweight]</B></TD>\n";
  725
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$WORKSHOP_FWEIGHTS[$reliabilityweight]</b></td>\n";
726 726
 			}
727 727
 		if ($usegradinggrades) {
728  
-			echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>$WORKSHOP_FWEIGHTS[$gradingweight]</B></TD>\n";
  728
+			echo "<td bgcolor=\"$THEME->cellheading2\" align=\"center\"><b>$WORKSHOP_FWEIGHTS[$gradingweight]</b></td>\n";
729 729
 			}
730  
-		echo "<TD BGCOLOR=\"$THEME->cellheading2\"><B>&nbsp;</B></TD></TR>\n";
  730
+		echo "<td bgcolor=\"$THEME->cellheading2\"><b>&nbsp;</b></td></tr>\n";
731 731
 		foreach ($users as $user) {
732 732
 			if ($submissions = workshop_get_user_submissions($workshop, $user)) {
733 733
 				foreach ($submissions as $submission) {
734  
-					echo "<TR><TD>$user->firstname $user->lastname</TD>";
735  
-					echo "<TD>".workshop_print_submission_title($workshop, $submission)."</TD>\n";
  734
+					echo "<tr><td>$user->firstname $user->lastname</td>";
  735
+					echo "<td>".workshop_print_submission_title($workshop, $submission)."</td>\n";
736 736
 					if ($useteachersgrades) {
737  
-						echo "<TD>".workshop_print_submission_assessments($workshop, $submission, "teacher")."</TD>";
  737
+						echo "<td align=\"center\">".workshop_print_submission_assessments($workshop, $submission, "teacher")."</td>";
738 738
 						}
739 739
 					if ($usepeergrades) {
740  
-						echo "<TD>".workshop_print_submission_assessments($workshop, $submission, "student")."</TD>";
  740
+						echo "<td align=\"center\">".workshop_print_submission_assessments($workshop, $submission, "student")."</td>";
741 741
 						}
742  
-					echo "<TD>".workshop_print_user_assessments($workshop, $user)."</TD>";
  742
+					echo "<td align=\"center\">".workshop_print_user_assessments($workshop, $user)."</td>";
743 743
 					if ($usebiasgrades) {
744  
-						echo "<TD>$submission->biasgrade</TD>";
  744
+						echo "<td align=\"center\">$submission->biasgrade</td>";
745 745
 						}
746 746
 					if ($usereliabilitygrades) {
747  
-						echo "<TD>$submission->reliabilitygrade</TD>";
  747
+						echo "<td align=\"center\">$submission->reliabilitygrade</td>";
748 748
 						}
749 749
 					if ($usegradinggrades) {
750  
-						echo "<TD>$submission->gradinggrade</TD>";
  750
+						echo "<td align=\"center\">$submission->gradinggrade</td>";
751 751
 						}
752  
-					echo "<TD>$submission->finalgrade</TD></TR>\n";
  752
+					echo "<td align=\"center\">$submission->finalgrade</td></tr>\n";
753 753
 					}
754 754
 				}
755 755
 			}
756  
-		echo "</TABLE><BR CLEAR=ALL>\n";
  756
+		echo "</table><br clear=\"all\">\n";
  757
+		workshop_print_league_table($workshop);
  758
+		echo "<br clear=\"all\">\n";
757 759
 		print_string("allgradeshaveamaximumof", "workshop", $workshop->grade);
758 760
 		print_continue("view.php?a=$workshop->id");
759 761
 		}
@@ -790,9 +792,9 @@
790 792
 			// now show the weights used in the final grades
791 793
 			print_heading_with_help(get_string("calculationoffinalgrades", "workshop"), "calculatingfinalgrade", "workshop");
792 794
 			echo "<TABLE WIDTH=\"50%\" BORDER=\"1\">\n";
793  
-			echo "<TR><TD COLSPAN=\"2\" BGCOLOR=\"$THEME->cellheading2\"><CENTER><B>".
  795
+			echo "<TR><td COLSPAN=\"2\" bgcolor=\"$THEME->cellheading2\"><CENTER><B>".
794 796
 				get_string("weightsusedforfinalgrade", "workshop")."</B></CENTER></TD></TR>\n";
795  
-			echo "<TR><TD ALIGN=\"right\">".get_string("weightforteachersassessment", "workshop").":</TD>\n";
  797
+			echo "<tr><td align=\"right\">".get_string("weightforteacherassessments", "workshop", $course->teacher).":</td>\n";
796 798
 			echo "<TD>";
797 799
 			workshop_choose_from_menu($WORKSHOP_FWEIGHTS, "teacherweight", $teacherweight, "");
798 800
 			echo "</TD></TR>\n";
@@ -812,7 +814,7 @@
812 814
 			echo "<TD>";
813 815
 			workshop_choose_from_menu($WORKSHOP_FWEIGHTS, "gradingweight", $gradingweight, "");
814 816
 			echo "</TD></TR>\n";
815  
-			echo "<TR><TD COLSPAN=\"2\" BGCOLOR=\"$THEME->cellheading2\"><CENTER><B>".
  817
+			echo "<TR><TD COLSPAN=\"2\" bgcolor=\"$THEME->cellheading2\"><CENTER><B>".
816 818
 				get_string("optionforpeergrade", "workshop")."</B></CENTER></TD></TR>\n";
817 819
 			echo "<TR><TD ALIGN=\"right\">".get_string("includeteachersgrade", "workshop").":</TD>\n";
818 820
 			echo "<TD>";
2  mod/workshop/version.php
@@ -5,7 +5,7 @@
5 5
 //  This fragment is called by /admin/index.php
6 6
 ////////////////////////////////////////////////////////////////////////////////
7 7
 
8  
-$module->version  = 2003051400;
  8
+$module->version  = 2003082200;
9 9
 $module->cron     = 60;
10 10
 
11 11
 ?>
60  mod/workshop/view.php
... ...
@@ -1,4 +1,4 @@
1  
-<?PHP  // $Id: view.php, v1.1 21 Aug 2003
  1
+<?PHP  // $Id: view.php, v1.1 22 Aug 2003
2 2
 
3 3
 /*************************************************
4 4
 	ACTIONS handled are:
@@ -156,68 +156,68 @@
156 156
 		// show the final grades as stored in the tables...
157 157
 		print_heading_with_help(get_string("displayoffinalgrades", "workshop"), "finalgrades", "workshop");
158 158
 		if ($submissions = workshop_get_user_submissions($workshop, $USER)) { // any submissions from user?
159  
-			echo "<CENTER><TABLE BORDER=1 WIDTH=\"90%\"><TR>";
160  
-			echo "<TD><B>".get_string("submissions", "workshop")."</B></TD>";
  159
+			echo "<center><table border=\"1\" width=\"90%\"><tr>";
  160
+			echo "<td><b>".get_string("submissions", "workshop")."</b></td>";
161 161
 			if ($useteachersgrades) {
162  
-				echo "<TD><B>".get_string("teachersassessment", "workshop")."</B></TD>";
  162
+				echo "<td align=\"center\"><b>".get_string("teacherassessments", "workshop", $course->teacher)."</b></td>";
163 163
 				}
164 164
 			if ($usepeergrades) {
165  
-				echo "<TD><B>".get_string("studentsassessment", "workshop")."</B></TD>";
  165
+				echo "<td align=\"center\"><b>".get_string("studentassessments", "workshop", $course->student)."</b></td>";
166 166
 				}
167  
-			echo "<TD><B>".get_string("assessmentsdone", "workshop")."</B></TD>";
  167
+			echo "<td align=\"center\"><b>".get_string("assessmentsdone", "workshop")."</b></td>";
168 168
 			if ($usebiasgrades) {
169  
-				echo "<TD><B>".get_string("gradeforbias", "workshop")."</B></TD>";
  169
+				echo "<td align=\"center\"><b>".get_string("gradeforbias", "workshop")."</b></td>";
170 170
 				}
171 171
 			if ($usereliabilitygrades) {
172  
-				echo "<TD><B>".get_string("gradeforreliability", "workshop")."</B></TD>";
  172
+				echo "<td align=\"center\"><b>".get_string("gradeforreliability", "workshop")."</b></td>";
173 173
 				}
174 174
 			if ($usegradinggrades) {
175  
-				echo "<TD><B>".get_string("gradeforassessments", "workshop")."</B></TD>";
  175
+				echo "<td align=\"center\"><b>".get_string("gradeforassessments", "workshop")."</b></td>";
176 176
 				}
177  
-			echo "<TD><B>".get_string("overallgrade", "workshop")."</B></TD></TR>\n";
  177
+			echo "<td align=\"center\"><b>".get_string("overallgrade", "workshop")."</b></td></TR>\n";
178 178
 			// now the weights
179  
-			echo "<TR><TD><B>".get_string("weights", "workshop")."</B></TD>";
  179
+			echo "<TR><td><b>".get_string("weights", "workshop")."</b></td>";
180 180
 			if ($useteachersgrades) {
181  
-				echo "<TD><B>$workshop_FWEIGHTS[$teacherweight]</B></TD>\n";
  181
+				echo "<td align=\"center\"><b>$WORKSHOP_FWEIGHTS[$teacherweight]</b></td>\n";
182 182
 				}
183 183
 			if ($usepeergrades) {
184  
-				echo "<TD><B>$workshop_FWEIGHTS[$peerweight]</B></TD>\n";
  184
+				echo "<td align=\"center\"><b>$WORKSHOP_FWEIGHTS[$peerweight]</b></td>\n";
185 185
 				}
186  
-			echo "<TD><B>&nbsp;</B></TD>\n";
  186
+			echo "<td><b>&nbsp;</b></td>\n";
187 187
 			if ($usebiasgrades) {
188  
-				echo "<TD><B>$workshop_FWEIGHTS[$biasweight]</B></TD>\n";
  188
+				echo "<td align=\"center\"><b>$WORKSHOP_FWEIGHTS[$biasweight]</b></td>\n";
189 189
 				}
190 190
 			if ($usereliabilitygrades) {
191  
-				echo "<TD><B>$workshop_FWEIGHTS[$reliabilityweight]</B></TD>\n";
  191
+				echo "<td align=\"center\"><b>$WORKSHOP_FWEIGHTS[$reliabilityweight]</b></td>\n";
192 192
 				}
193 193
 			if ($usegradinggrades) {
194  
-				echo "<TD><B>$workshop_FWEIGHTS[$gradingweight]</B></TD>\n";
  194
+				echo "<td align=\"center\"><b>$WORKSHOP_FWEIGHTS[$gradingweight]</b></td>\n";
195 195
 				}
196  
-			echo "<TD><B>&nbsp;</B></TD></TR>\n";
  196
+			echo "<td><b>&nbsp;</b></td></TR>\n";
197 197
 			foreach ($submissions as $submission) {
198  
-				echo "<TR><TD>".workshop_print_submission_title($workshop, $submission)."</TD>\n";
  198
+				echo "<TR><td>".workshop_print_submission_title($workshop, $submission)."</td>\n";
199 199
 				if ($useteachersgrades) {
200  
-					echo "<TD>".workshop_print_submission_assessments($workshop, $submission, "teacher")."</TD>";
  200
+					echo "<td align=\"center\">".workshop_print_submission_assessments($workshop, $submission, "teacher")."</td>";
201 201
 					}
202 202
 				if ($usepeergrades) {
203  
-					echo "<TD>".workshop_print_submission_assessments($workshop, $submission, "student")."</TD>";
  203
+					echo "<td align=\"center\">".workshop_print_submission_assessments($workshop, $submission, "student")."</td>";
204 204
 					}
205  
-				echo "<TD>".workshop_print_user_assessments($workshop, $USER)."</TD>";
  205
+				echo "<td align=\"center\">".workshop_print_user_assessments($workshop, $USER)."</td>";
206 206
 				if ($usebiasgrades) {
207  
-					echo "<TD>$submission->biasgrade</TD>";
  207
+					echo "<td align=\"center\">$submission->biasgrade</td>";
208 208
 					}
209 209
 				if ($usereliabilitygrades) {
210  
-					echo "<TD>$submission->reliabilitygrade</TD>";
  210
+					echo "<td align=\"center\">$submission->reliabilitygrade</td>";
211 211
 					}
212 212
 				if ($usegradinggrades) {
213  
-					echo "<TD>$submission->gradinggrade</TD>";
  213
+					echo "<td align=\"center\">$submission->gradinggrade</td>";
214 214
 					}
215  
-				echo "<TD>$submission->finalgrade</TD></TR>\n";
  215
+				echo "<td align=\"center\">$submission->finalgrade</td></TR>\n";
216 216
 				}
217 217
 			}
218 218
 		echo "</TABLE><BR CLEAR=ALL>\n";
  219
+		workshop_print_league_table($workshop);
219 220
 		print_string("allgradeshaveamaximumof", "workshop", $workshop->grade);
220  
-		print_continue("view.php?a=$workshop->id");
221 221
 		}
222 222
 
223 223
 
@@ -332,12 +332,12 @@
332 332
 				// list previous submissions
333 333
 				print_heading(get_string("submissions", "workshop"));
334 334
 				workshop_list_user_submissions($workshop, $USER);
335  
-				echo "<HR SIZE=1 NOSHADE>";
  335
+				echo "<hr size=\"1\" noshade>";
336 336
 				if ($workshop->resubmit) {
337 337
 					// if resubmissions allowed print upload form
338 338
 					print_heading(get_string("submitassignment", "assignment").":");
339 339
 					workshop_print_upload_form($workshop);
340  
-					echo "<HR SIZE=1 NOSHADE>";
  340
+					echo "<hr size=\"1\" noshade>";
341 341
 					}
342 342
 				// allow user to list their submissions and assessments in a general way????
343 343
 				// print_heading("<A HREF=\"submissions.php?action=listallsubmissions&id=$cm->id\">".
@@ -396,7 +396,7 @@
396 396
 			}
397 397
 
398 398
 		print_heading_with_help(get_string("managingassignment", "workshop"), "managing", "workshop");
399  
-		$tabs->names = array("1. ".get_string("phase1", "workshop"), "2. ".get_string("phase2", "workshop"), 
  399
+		$tabs->names = array("1. ".get_string("phase1", "workshop"), "2. ".get_string("phase2", "workshop", $course->student), 
400 400
 			"3. ".get_string("phase3", "workshop"), "4. ".get_string("phase4", "workshop"));
401 401
 		$tabs->urls = array("view.php?id=$cm->id&action=setupassignment", 
402 402
 			"view.php?id=$cm->id&action=openworkshop",

0 notes on commit a94928f

Please sign in to comment.
Something went wrong with that request. Please try again.