Permalink
Browse files

On the Workshops submissions with no assessments are flagged as such …

…rather than given a zero grade.
  • Loading branch information...
1 parent bfce67a commit 1c1df31ca0c9ecefa2fed353f9b37c4c6db6b066 rkingdon committed Oct 12, 2004
Showing with 10 additions and 4 deletions.
  1. +10 −4 mod/workshop/index.php
View
@@ -81,10 +81,16 @@
$gradinggrade = workshop_gradinggrade($workshop, $USER);
$grade = workshop_submission_grade($workshop, $submission);
if ($workshop->wtype) {
- $info = get_string("gradeforassessments", "workshop").
- ": $gradinggrade/$workshop->gradinggrade; ".get_string("gradeforsubmission", "workshop").
- ": $grade/$workshop->grade";
- } else { // simple assignemnt, don't show grading grade
+ if (workshop_count_assessments($submission)) {
+ $info = get_string("gradeforassessments", "workshop").
+ ": $gradinggrade/$workshop->gradinggrade; ".get_string("gradeforsubmission",
+ "workshop").": $grade/$workshop->grade";
+ } else {
+ $info = get_string("gradeforassessments", "workshop").
+ ": $gradinggrade/$workshop->gradinggrade; ".get_string("gradeforsubmission",
+ "workshop").": ".get_string("noassessments", "workshop");
+ }
+ } else { // simple assignemnt, don't show grading grade
$info = get_string("gradeforsubmission", "workshop").": $grade/$workshop->grade";
}
}

0 comments on commit 1c1df31

Please sign in to comment.