Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…rather than given a zero grade.
  • Loading branch information...
commit 1c1df31ca0c9ecefa2fed353f9b37c4c6db6b066 1 parent bfce67a
rkingdon authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 mod/workshop/index.php
View
14 mod/workshop/index.php
@@ -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";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.