Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug #1952; fixed bug in upload form; and assessment form now

displays the correct grade.
  • Loading branch information...
commit aa8f2d1ec165acc3f054b273854cd8976f0787b5 1 parent 7f02f53
rkingdon authored
View
6 mod/workshop/lib.php
@@ -1183,9 +1183,11 @@ function workshop_compare_assessments($workshop, $assessment1, $assessment2) {
//////////////////////////////////////////////////////////////////////////////////////
function workshop_count_ungraded_assessments($workshop) {
- // function returns the number of ungraded assessments (ANY assessments)
+ // function returns the number of ungraded assessments (assessments must be warm or cold)
- return count_records("workshop_assessments", "workshopid", $workshop->id, "timegraded", 0) ;
+ $timenow = time();
+ return count_records_select("workshop_assessments", "workshopid = $workshop->id AND
+ timecreated < $timenow AND timegraded = 0") ;
}
View
5 mod/workshop/locallib.php
@@ -1819,7 +1819,8 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
// only show the grade if grading strategy > 0 and the grade is positive
if ($showgrades and $workshop->gradingstrategy and $assessment->grade >= 0) {
- echo "<center><b>".get_string("thegradeis", "workshop").": ".number_format($assessment->grade, 2)." (".
+ echo "<center><b>".get_string("thegradeis", "workshop").": ".
+ number_format($assessment->grade * $workshop->grade / 100, 2)." (".
get_string("maximumgrade")." ".number_format($workshop->grade, 0).")</b></center><br clear=\"all\" />\n";
}
}
@@ -2688,7 +2689,7 @@ function workshop_print_upload_form($workshop) {
}
echo "<div align=\"center\">";
- echo "<form enctype=\"multipart/form-data\" method=\"POST\" action=\"upload\".php>";
+ echo "<form enctype=\"multipart/form-data\" method=\"POST\" action=\"upload.php\">";
echo " <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
require_once($CFG->dirroot.'/lib/uploadlib.php');
upload_print_form_fragment(1,array('newfile'),null,true,array('title'),$course->maxbytes,$workshop->maxbytes,false);
View
1  mod/workshop/mod.html
@@ -341,7 +341,6 @@
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
<p>
-<p><?php notify(get_string("noteonassessmentelements", "workshop")); ?>
</center>
</form>
View
2  mod/workshop/view.php
@@ -56,7 +56,7 @@
$action = "teachersview";
}
else {
- redirect("assessments.php?action=editelements&amp;id=$cm->id");
+ redirect("assessments.php?action=editelements&id=$cm->id");
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.