mirror of
https://github.com/moodle/moodle.git
synced 2025-02-02 14:19:07 +01:00
Fixed bug #1952; fixed bug in upload form; and assessment form now
displays the correct grade.
This commit is contained in:
parent
7f02f534d0
commit
aa8f2d1ec1
@ -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") ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -56,7 +56,7 @@
|
||||
$action = "teachersview";
|
||||
}
|
||||
else {
|
||||
redirect("assessments.php?action=editelements&id=$cm->id");
|
||||
redirect("assessments.php?action=editelements&id=$cm->id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user