Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Addition of Mail strings to cron routine; More help in admin page; bug

clearance.
  • Loading branch information...
commit 41b12a791ba140522a67a081521a351a4dfec904 1 parent 341684f
authored August 27, 2003
2  mod/workshop/assessments.php
@@ -60,7 +60,7 @@
60 60
     }
61 61
 
62 62
     require_login($course->id);
63  
-
  63
+	
64 64
     $navigation = "";
65 65
     if ($course->category) {
66 66
         $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
106  mod/workshop/lib.php
@@ -252,8 +252,8 @@ function workshop_cron () {
252 252
 			// it's an assessment, tell the submission owner
253 253
 			$USER->lang = $submissionowner->lang;
254 254
 			$sendto = $submissionowner;
255  
-			// "Your assignment \"$submission->title\" has been assessed."
256  
-			$msg = get_string("mail1", "workshop", $submission->title)."\n".
  255
+			// "Your assignment \"$submission->title\" has been assessed by"
  256
+			$msg = get_string("mail1", "workshop", $submission->title)." $assessmentowner->firstname $assessmentowner->lastname.\n";
257 257
 			// "The comments and grade can be seen in the workshop assignment '$workshop->name'
258 258
 			$msg .= get_string("mail2", "workshop", $workshop->name)."\n\n";
259 259
 	
@@ -261,7 +261,7 @@ function workshop_cron () {
261 261
 			$posttext  = "$course->shortname -> $strworkshops -> $workshop->name\n";
262 262
 			$posttext .= "---------------------------------------------------------------------\n";
263 263
 			$posttext .= $msg;
264  
-			// "You can see it in your workshop assignment
  264
+			// "You can see it in your workshop assignment"
265 265
 			$posttext .= get_string("mail3", "workshop").":\n";
266 266
 			$posttext .= "   $CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\n";
267 267
 			$posttext .= "---------------------------------------------------------------------\n";
@@ -272,8 +272,8 @@ function workshop_cron () {
272 272
 			  "<A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A></FONT></P>";
273 273
 			  $posthtml .= "<HR><FONT FACE=sans-serif>";
274 274
 			  $posthtml .= "<P>$msg</P>";
275  
-			  $posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">";
276  
-			  $posthtml .= "in your workshop assignment</A>.</P></FONT><HR>";
  275
+			  $posthtml .= "<P>".get_string("mail3", "workshop").
  276
+				  " <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A>.</P></FONT><HR>";
277 277
 			} else {
278 278
 			  $posthtml = "";
279 279
 			}
@@ -336,15 +336,17 @@ function workshop_cron () {
336 336
 			if ($comment->userid != $submission->userid) {
337 337
 				$USER->lang = $submissionowner->lang;
338 338
 				$sendto = $submissionowner;
339  
-				$msg = "A comment has been added to the assignment \"$submission->title\".\n".
340  
-					"The new comment can be seen in ".
341  
-					"the workshop assignment '$workshop->name'\n\n";
  339
+				// "A comment has been added to the assignment \"$submission->title\" by
  340
+				$msg = get_string("mail4", "workshop", $submission->title)." $assessmentowner->firstname $assessmentowner->lastname.\n";
  341
+				// "The new comment can be seen in the workshop assignment '$workshop->name'
  342
+				$msg .= get_string("mail5", "workshop", $workshop->name)."\n\n";
342 343
 	
343 344
 				$postsubject = "$course->shortname: $strworkshops: $workshop->name";
344 345
 				$posttext  = "$course->shortname -> $strworkshops -> $workshop->name\n";
345 346
 				$posttext .= "---------------------------------------------------------------------\n";
346 347
 				$posttext .= $msg;
347  
-				$posttext .= "You can see it in your workshop assignment:\n";
  348
+				// "You can see it in your workshop assignment"
  349
+				$posttext .= get_string("mail3", "workshop").":\n";
348 350
 				$posttext .= "   $CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\n";
349 351
 				$posttext .= "---------------------------------------------------------------------\n";
350 352
 				if ($sendto->mailformat == 1) {  // HTML
@@ -354,8 +356,8 @@ function workshop_cron () {
354 356
 					"<A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A></FONT></P>";
355 357
 					$posthtml .= "<HR><FONT FACE=sans-serif>";
356 358
 					$posthtml .= "<P>$msg</P>";
357  
-					$posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">";
358  
-					$posthtml .= "in your workshop assignment</A>.</P></FONT><HR>";
  359
+					$posthtml .= "<P>".get_string("mail3", "workshop").
  360
+						" <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A>.</P></FONT><HR>";
359 361
 					} 
360 362
 				else {
361 363
 					$posthtml = "";
@@ -376,15 +378,17 @@ function workshop_cron () {
376 378
 			if ($comment->userid != $assessment->userid) {
377 379
 				$USER->lang = $assessmentowner->lang;
378 380
 				$sendto = $assessmentowner;
379  
-				$msg = "A comment has been added to the assignment \"$submission->title\".\n".
380  
-					"The new comment can be seen in ".
381  
-					"the workshop assignment '$workshop->name'\n\n";
  381
+				// "A comment has been added to the assignment \"$submission->title\" by
  382
+				$msg = get_string("mail4", "workshop", $submission->title)." $submissionowner->firstname $submissionowner->lastname.\n";
  383
+				// "The new comment can be seen in the workshop assignment '$workshop->name'
  384
+				$msg .= get_string("mail5", "workshop", $workshop->name)."\n\n";
382 385
 	
383 386
 				$postsubject = "$course->shortname: $strworkshops: $workshop->name";
384 387
 				$posttext  = "$course->shortname -> $strworkshops -> $workshop->name\n";
385 388
 				$posttext .= "---------------------------------------------------------------------\n";
386 389
 				$posttext .= $msg;
387  
-				$posttext .= "You can see it in your workshop assignment:\n";
  390
+				// "You can see it in your workshop assignment"
  391
+				$posttext .= get_string("mail3", "workshop").":\n";
388 392
 				$posttext .= "   $CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\n";
389 393
 				$posttext .= "---------------------------------------------------------------------\n";
390 394
 				if ($sendto->mailformat == 1) {  // HTML
@@ -394,8 +398,8 @@ function workshop_cron () {
394 398
 					"<A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A></FONT></P>";
395 399
 					$posthtml .= "<HR><FONT FACE=sans-serif>";
396 400
 					$posthtml .= "<P>$msg</P>";
397  
-					$posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">";
398  
-					$posthtml .= "in your workshop assignment</A>.</P></FONT><HR>";
  401
+					$posthtml .= "<P>".get_string("mail3", "workshop").
  402
+						" <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A>.</P></FONT><HR>";
399 403
 					} 
400 404
 				else {
401 405
 					$posthtml = "";
@@ -463,26 +467,28 @@ function workshop_cron () {
463 467
 			// it's a grading tell the assessment owner
464 468
 			$USER->lang = $assessmentowner->lang;
465 469
 			$sendto = $assessmentowner;
466  
-			$msg = "Your assessment of the assignment \"$submission->title\" has by graded.\n".
467  
-					"The comments and grade given by the $course->teacher can be seen in ".
468  
-					"the workshop assignment '$workshop->name'\n\n";
  470
+			// Your assessment of the assignment \"$submission->title\" has by reviewed
  471
+			$msg = get_string("mail6", "workshop", $submission->title).".\n";
  472
+			// The comments given by the $course->teacher can be seen in the Workshop Assignment 
  473
+			$msg .= get_string("mail7", "workshop", $course->teacher)." '$workshop->name'.\n\n";
469 474
 
470 475
 			$postsubject = "$course->shortname: $strworkshops: $workshop->name";
471 476
             $posttext  = "$course->shortname -> $strworkshops -> $workshop->name\n";
472 477
             $posttext .= "---------------------------------------------------------------------\n";
473 478
             $posttext .= $msg;
474  
-            $posttext .= "You can see it in your workshop assignment:\n";
475  
-            $posttext .= "   $CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\n";
  479
+			// "You can see it in your workshop assignment"
  480
+			$posttext .= get_string("mail3", "workshop").":\n";
  481
+			$posttext .= "   $CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\n";
476 482
             $posttext .= "---------------------------------------------------------------------\n";
477 483
             if ($sendto->mailformat == 1) {  // HTML
478  
-                $posthtml = "<P><FONT FACE=sans-serif>".
479  
-              "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->".
480  
-              "<A HREF=\"$CFG->wwwroot/mod/workshop/index.php?id=$course->id\">$strworkshops</A> ->".
481  
-              "<A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A></FONT></P>";
482  
-              $posthtml .= "<HR><FONT FACE=sans-serif>";
483  
-              $posthtml .= "<P>$msg</P>";
484  
-              $posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">";
485  
-              $posthtml .= "in your workshop assignment</A>.</P></FONT><HR>";
  484
+				$posthtml = "<P><FONT FACE=sans-serif>".
  485
+					"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->".
  486
+					"<A HREF=\"$CFG->wwwroot/mod/workshop/index.php?id=$course->id\">$strworkshops</A> ->".
  487
+					"<A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A></FONT></P>";
  488
+				$posthtml .= "<HR><FONT FACE=sans-serif>";
  489
+				$posthtml .= "<P>$msg</P>";
  490
+				$posthtml .= "<P>".get_string("mail3", "workshop").
  491
+					" <A HREF=\"$CFG->wwwroot/mod/workshop/view.php?a=$workshop->id\">$workshop->name</A>.</P></FONT><HR>";
486 492
             } else {
487 493
               $posthtml = "";
488 494
             }
@@ -701,6 +707,7 @@ function workshop_list_user_submissions($workshop, $user) {
701 707
 function workshop_print_assessment($workshop, $assessment, $allowchanges, $showcommentlinks)
702 708
 function workshop_print_assessments_by_user_for_admin($workshop, $user) {
703 709
 function workshop_print_assessments_for_admin($workshop, $submission) {
  710
+function workshop_print_assignment_info($workshop) {
704 711
 function workshop_print_difference($time) {
705 712
 function workshop_print_feedback($course, $submission) {
706 713
 function workshop_print_league_table($workshop) {
@@ -1587,25 +1594,7 @@ function workshop_list_submissions_for_admin($workshop, $order) {
1587 1594
         error("Course Module ID was incorrect");
1588 1595
     }
1589 1596
 
1590  
-	// print standard assignment "header"
1591  
-	$strdifference = format_time($workshop->deadline - time());
1592  
-	if (($workshop->deadline - time()) < 0) {
1593  
-		$strdifference = "<FONT COLOR=RED>$strdifference</FONT>";
1594  
-	}
1595  
-	$strduedate = userdate($workshop->deadline)." ($strdifference)";
1596  
-	print_simple_box_start("CENTER");
1597  
-	print_heading($workshop->name, "CENTER");
1598  
-	print_simple_box_start("CENTER");
1599  
-	echo "<B>".get_string("duedate", "assignment")."</B>: $strduedate<BR>";
1600  
-	echo "<B>".get_string("maximumgrade")."</B>: $workshop->grade<BR>";
1601  
-	echo "<B>".get_string("detailsofassessment", "workshop")."</B>: 
1602  
-		<A HREF=\"assessments.php?id=$cm->id&action=displaygradingform\">".
1603  
-		get_string("specimenassessmentform", "workshop")."</A><BR>";
1604  
-	print_simple_box_end();
1605  
-	echo "<BR>";
1606  
-	echo format_text($workshop->description, $workshop->format);
1607  
-	print_simple_box_end();
1608  
-	echo "<BR>";
  1597
+	workshop_print_assignment_info($workshop);
1609 1598
 
1610 1599
 	// list any teacher submissions
1611 1600
 	$table->head = array (get_string("title", "workshop"), get_string("submittedby", "workshop"), get_string("action", "workshop"));
@@ -1723,7 +1712,7 @@ function workshop_list_submissions_for_admin($workshop, $order) {
1723 1712
 					AND userid = $USER->id")) {
1724 1713
 				$curtime = time();
1725 1714
 				if (($curtime - $assessment->timecreated) > $CFG->maxeditingtime) {
1726  
-					$action .= " | <a href=\"assessments.php?action=assesssubmission&a=$workshop->id&aid=$assessment->id\">".
  1715
+					$action .= " | <a href=\"assessments.php?action=assesssubmission&a=$workshop->id&sid=$submission->id\">".
1727 1716
 						get_string("reassess", "workshop")."</a>";
1728 1717
 					}
1729 1718
 				else { // there's still time left to edit...
@@ -2603,6 +2592,23 @@ function workshop_print_assessments_for_admin($workshop, $submission) {
2603 2592
 	}
2604 2593
 
2605 2594
 
  2595
+function workshop_print_assignment_info($workshop) {
  2596
+	print_simple_box_start("center");
  2597
+	print_heading($workshop->name);
  2598
+	print_simple_box_start("center");
  2599
+	echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";
  2600
+	echo "<b>".get_string("maximumgrade")."</b>: $workshop->grade<br />";
  2601
+	echo "<b>".get_string("detailsofassessment", "workshop")."</b>: 
  2602
+		<a href=\"assessments.php?id=$cm->id&action=displaygradingform\">".
  2603
+		get_string("specimenassessmentform", "workshop")."</a><br />";
  2604
+	print_simple_box_end();
  2605
+	echo "<br />";
  2606
+	echo format_text($workshop->description, $workshop->format);
  2607
+	print_simple_box_end();
  2608
+	echo "<br />";
  2609
+	}
  2610
+
  2611
+
2606 2612
 function workshop_print_difference($time) {
2607 2613
     if ($time < 0) {
2608 2614
         $timetext = get_string("late", "assignment", format_time($time));
2  mod/workshop/mod.html
@@ -109,7 +109,7 @@
109 109
 
110 110
 <tr valign=top>
111 111
     <td align=right><P><B><? print_string("numberofassessmentelements", "workshop") ?>:</B></P></TD>
112  
-    <td>
  112
+    <td valign="middle">
113 113
         <?
114 114
         for ($i=20; $i>=0; $i--) {
115 115
             $numbers[$i] = $i;
111  mod/workshop/view.php
@@ -236,7 +236,7 @@
236 236
 	
237 237
 	/*********************** assignment not available (for students)***********************/
238 238
 	elseif ($action == 'notavailable') {
239  
-		echo "<p><center>".get_string("notavailable", "workshop")."</center>\n";
  239
+		print_heading(get_string("notavailable", "workshop"));
240 240
 		}
241 241
 
242 242
 
@@ -352,46 +352,28 @@
352 352
 		}
353 353
 
354 354
 
355  
-	/*********************** submission of assignment by a student/teacher ***********************/
  355
+	/*********************** submission of assignment by teacher only***********************/
356 356
 	elseif ($action == 'submitassignment') {
  357
+	
  358
+		if (!isteacher($course->id)) {
  359
+			error("Only teachers can look at this page");
  360
+			}
  361
+			
357 362
 		$strdifference = format_time($workshop->deadline - time());
358 363
 		if (($workshop->deadline - time()) < 0) {
359 364
 			$strdifference = "<FONT COLOR=RED>$strdifference</FONT>";
360 365
 		}
361 366
 		$strduedate = userdate($workshop->deadline)." ($strdifference)";
362 367
 	
363  
-		print_simple_box_start("CENTER");
364  
-		print_heading($workshop->name, "CENTER");
365  
-		print_simple_box_start("CENTER");
366  
-		echo "<B>".get_string("duedate", "assignment")."</B>: $strduedate<BR>";
367  
-		echo "<B>".get_string("maximumgrade")."</B>: $workshop->grade<BR>";
368  
-		echo "<B>".get_string("detailsofassessment", "workshop")."</B>: 
369  
-			<A HREF=\"assessments.php?id=$cm->id&action=displaygradingform\">".
370  
-			get_string("specimenassessmentform", "workshop")."</A><BR>";
371  
-		print_simple_box_end();
372  
-		echo "<BR>";
373  
-		echo format_text($workshop->description, $workshop->format);
374  
-		print_simple_box_end();
375  
-		echo "<BR>";
  368
+		workshop_print_assignment_info($workshop);
376 369
 		
377  
-		// only list teacher and (other) student submissions if it's a student
378  
-		if (isstudent($course->id)) {
379  
-			workshop_list_teacher_submissions($workshop, $USER);
380  
-			echo "<HR SIZE=1 NOSHADE>";
381  
-			echo "<BR>";
382  
-			
383  
-			workshop_list_student_submissions($workshop, $USER);
384  
-			echo "<HR SIZE=1 NOSHADE>";
385  
-			echo "<BR>";
386  
-			}
387  
-			
388  
-		// list previous submissions from this user (could be a teacher or a student)
  370
+		// list previous submissions from teacher 
389 371
 		workshop_list_user_submissions($workshop, $USER);
390 372
 	
391 373
 		echo "<HR SIZE=1 NOSHADE>";
392 374
 	
393 375
 		// print upload form
394  
-		print_heading(get_string("submitassignment", "assignment").":", "CENTER");
  376
+		print_heading(get_string("submitassignment", "assignment").":");
395 377
 		workshop_print_upload_form($workshop);
396 378
 		}
397 379
 
@@ -404,6 +386,9 @@
404 386
 			}
405 387
 
406 388
 		print_heading_with_help(get_string("managingassignment", "workshop"), "managing", "workshop");
  389
+		
  390
+		workshop_print_assignment_info($workshop);
  391
+		
407 392
 		$tabs->names = array("1. ".get_string("phase1", "workshop"), "2. ".get_string("phase2", "workshop", $course->student), 
408 393
 			"3. ".get_string("phase3", "workshop"), "4. ".get_string("phase4", "workshop"));
409 394
 		$tabs->urls = array("view.php?id=$cm->id&action=setupassignment", 
@@ -416,45 +401,67 @@
416 401
 			$tabs->highlight = 0; // phase is zero
417 402
 			}
418 403
 		workshop_print_tabbed_heading($tabs);
419  
-		echo "<CENTER><P>\n";
  404
+		echo "<center>\n";
420 405
 			switch ($workshop->phase) {
421 406
 				case 0:
422 407
 				case 1: // set up assignment
423  
-					print_heading("<A HREF=\"assessments.php?id=$cm->id&action=editelements\">".
424  
-						  get_string("amendassessmentelements", "workshop")."</A>");
425  
-					print_heading("<A HREF=\"view.php?id=$cm->id&action=submitassignment\">".
426  
-						get_string("submitexampleassignment", "workshop")."</A>");
427  
-					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=listforassessmentteacher\">".
428  
-						  get_string("teachersubmissionsforassessment", "workshop", 
429  
-							  workshop_count_teacher_submissions_for_assessment($workshop, $USER)).
430  
-						  "</A>");
  408
+					echo "<p><b><a href=\"assessments.php?id=$cm->id&action=editelements\">".
  409
+						  get_string("amendassessmentelements", "workshop")."</a></b> \n";
  410
+					helpbutton("elements", get_string("amendassessmentelements", "workshop"), "workshop");
  411
+					if ($workshop->ntassessments) { // if teacher examples show submission and assessment links
  412
+						echo "<p><b><a href=\"view.php?id=$cm->id&action=submitassignment\">".
  413
+							get_string("submitexampleassignment", "workshop")."</a></b> \n";
  414
+						helpbutton("submissionofexamples", get_string("submitexampleassignment", "workshop"), "workshop");
  415
+						echo "<p><b><a href=\"submissions.php?id=$cm->id&action=listforassessmentteacher\">".
  416
+							  get_string("teachersubmissionsforassessment", "workshop", 
  417
+								  workshop_count_teacher_submissions_for_assessment($workshop, $USER)).
  418
+							  "</a></b> \n";
  419
+						helpbutton("assessmentofexamples", get_string("teachersubmissionsforassessment", "workshop"), "workshop");
  420
+						}
431 421
 					break;
432 422
 					
433 423
 				case 2: // submissions and assessments
434  
-					print_heading("<A HREF=\"assessments.php?id=$cm->id&action=listungradedteachersubmissions\">".
435  
-						  get_string("ungradedassessmentsofteachersubmissions", "workshop", workshop_count_ungraded_assessments_teacher($workshop))."</A>");
436  
-					print_heading("<A HREF=\"assessments.php?id=$cm->id&action=listungradedstudentsubmissions\">".
437  
-						  get_string("ungradedassessmentsofstudentsubmissions", "workshop", workshop_count_ungraded_assessments_student($workshop))."</A>");
438  
-					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
439  
-						  get_string("studentsubmissionsforassessment", "workshop", workshop_count_student_submissions_for_assessment($workshop, $USER))."</A>");
  424
+					if ($workshop->ntassessments) { // if teacher example show student assessments link
  425
+						echo "<p><b><a href=\"assessments.php?id=$cm->id&action=listungradedteachersubmissions\">".
  426
+						  get_string("ungradedassessmentsofteachersubmissions", "workshop", 
  427
+						  workshop_count_ungraded_assessments_teacher($workshop))."</a></b> \n";
  428
+						helpbutton("ungradedassessments_teacher", get_string("ungradedassessmentsofteachersubmissions", "workshop"), "workshop");
  429
+						}
  430
+					echo "<p><b><a href=\"assessments.php?id=$cm->id&action=listungradedstudentsubmissions\">".
  431
+						  get_string("ungradedassessmentsofstudentsubmissions", "workshop", 
  432
+						  workshop_count_ungraded_assessments_student($workshop))."</a></b> \n";
  433
+					helpbutton("ungradedassessments_student", get_string("ungradedassessmentsofstudentsubmissions", "workshop"), "workshop");
  434
+					echo "<p><b><a href=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
  435
+						  get_string("studentsubmissionsforassessment", "workshop", 
  436
+						  workshop_count_student_submissions_for_assessment($workshop, $USER))."</a></b> \n";
  437
+					helpbutton("gradingsubmissions", get_string("studentsubmissionsforassessment", "workshop"), "workshop");
440 438
 					break;
441 439
 					
442 440
 				case 3: // calculate final grades
443  
-					print_heading("<A HREF=\"assessments.php?id=$cm->id&action=listungradedstudentsubmissions\">".
444  
-						  get_string("ungradedassessmentsofstudentsubmissions", "workshop", workshop_count_ungraded_assessments_student($workshop))."</A>");
445  
-					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
446  
-						  get_string("studentsubmissionsforassessment", "workshop", workshop_count_student_submissions_for_assessment($workshop, $USER))."</A>");
447  
-					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=displayfinalweights\">".
448  
-						  get_string("calculationoffinalgrades", "workshop")."</A>");
  441
+					if ($workshop->ntassessments) { // if teacher example show student assessments link
  442
+						echo "<p><b><a href=\"assessments.php?id=$cm->id&action=listungradedteachersubmissions\">".
  443
+						  get_string("ungradedassessmentsofteachersubmissions", "workshop", 
  444
+						  workshop_count_ungraded_assessments_teacher($workshop))."</a></b> \n";
  445
+						helpbutton("ungradedassessments_teacher", get_string("ungradedassessmentsofteachersubmissions", "workshop"), "workshop");
  446
+						}
  447
+					echo "<p><b><a href=\"assessments.php?id=$cm->id&action=listungradedstudentsubmissions\">".
  448
+						  get_string("ungradedassessmentsofstudentsubmissions", "workshop", 
  449
+						  workshop_count_ungraded_assessments_student($workshop))."</a></b> \n";
  450
+					helpbutton("ungradedassessments_student", get_string("ungradedassessmentsofstudentsubmissions", "workshop"), "workshop");
  451
+					echo "<p><b><a href=\"submissions.php?id=$cm->id&action=listforassessmentstudent\">".
  452
+						  get_string("studentsubmissionsforassessment", "workshop", 
  453
+						  workshop_count_student_submissions_for_assessment($workshop, $USER))."</a></b> \n";
  454
+					helpbutton("gradingsubmissions", get_string("studentsubmissionsforassessment", "workshop"), "workshop");
  455
+					print_heading("<a href=\"submissions.php?id=$cm->id&action=displayfinalweights\">".
  456
+						  get_string("calculationoffinalgrades", "workshop")."</a>");
449 457
 					break;
450 458
 					
451 459
 				case 4: // show final grades
452 460
 					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=displayfinalgrades\">".
453 461
 						  get_string("displayoffinalgrades", "workshop")."</A>");
454 462
 			}
455  
-					echo "<P><FONT SIZE=1>[".get_string("deadlineis", "workshop", userdate($workshop->deadline))."]</FONT></P>\n";
456  
-					print_heading("<A HREF=\"submissions.php?id=$cm->id&action=adminlist\">".
457  
-						get_string("administration")."</A>");
  463
+		print_heading("<A HREF=\"submissions.php?id=$cm->id&action=adminlist\">".
  464
+			get_string("administration")."</A>");
458 465
 		}
459 466
 	
460 467
 	

0 notes on commit 41b12a7

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