mirror of
https://github.com/moodle/moodle.git
synced 2025-01-21 23:48:45 +01:00
Fixed unassigned variables in function workshop_print_assignment_info
This commit is contained in:
parent
202ba3902e
commit
c75599f4c3
@ -2,6 +2,9 @@
|
||||
|
||||
include_once("$CFG->dirroot/files/mimetypes.php");
|
||||
|
||||
// reset error reporting
|
||||
error_reporting($CFG->debug);
|
||||
|
||||
/*** Constants **********************************/
|
||||
|
||||
$WORKSHOP_TYPE = array (0 => get_string("notgraded", "workshop"),
|
||||
@ -707,7 +710,7 @@ function workshop_list_user_submissions($workshop, $user) {
|
||||
function workshop_print_assessment($workshop, $assessment, $allowchanges, $showcommentlinks)
|
||||
function workshop_print_assessments_by_user_for_admin($workshop, $user) {
|
||||
function workshop_print_assessments_for_admin($workshop, $submission) {
|
||||
function workshop_print_assignment_info($workshop) {
|
||||
function workshop_print_assignment_info($cm, $workshop) {
|
||||
function workshop_print_difference($time) {
|
||||
function workshop_print_feedback($course, $submission) {
|
||||
function workshop_print_league_table($workshop) {
|
||||
@ -2593,8 +2596,21 @@ function workshop_print_assessments_for_admin($workshop, $submission) {
|
||||
|
||||
|
||||
function workshop_print_assignment_info($workshop) {
|
||||
|
||||
if (! $course = get_record("course", "id", $workshop->course)) {
|
||||
error("Course is misconfigured");
|
||||
}
|
||||
if (! $cm = get_coursemodule_from_instance("workshop", $workshop->id, $course->id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
}
|
||||
// print standard assignment heading
|
||||
$strdifference = format_time($workshop->deadline - time());
|
||||
if (($workshop->deadline - time()) < 0) {
|
||||
$strdifference = "<font color=\"red\">$strdifference</font>";
|
||||
}
|
||||
$strduedate = userdate($workshop->deadline)." ($strdifference)";
|
||||
print_simple_box_start("center");
|
||||
print_heading($workshop->name);
|
||||
print_heading($workshop->name, "center");
|
||||
print_simple_box_start("center");
|
||||
echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";
|
||||
echo "<b>".get_string("maximumgrade")."</b>: $workshop->grade<br />";
|
||||
@ -2605,7 +2621,7 @@ function workshop_print_assignment_info($workshop) {
|
||||
echo "<br />";
|
||||
echo format_text($workshop->description, $workshop->format);
|
||||
print_simple_box_end();
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,6 +64,7 @@
|
||||
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
|
||||
|
||||
// ...and if necessary set default action
|
||||
|
||||
optional_variable($action);
|
||||
if (isteacher($course->id)) {
|
||||
if (empty($action)) { // no action specified, either go straight to elements page else the admin page
|
||||
@ -273,25 +274,7 @@
|
||||
|
||||
/*********************** student's view could be in 1 of 4 stages ***********************/
|
||||
elseif ($action == 'studentsview') {
|
||||
// print standard assignment heading
|
||||
$strdifference = format_time($workshop->deadline - time());
|
||||
if (($workshop->deadline - time()) < 0) {
|
||||
$strdifference = "<font color=\"red\">$strdifference</font>";
|
||||
}
|
||||
$strduedate = userdate($workshop->deadline)." ($strdifference)";
|
||||
print_simple_box_start("CENTER");
|
||||
print_heading($workshop->name, "CENTER");
|
||||
print_simple_box_start("CENTER");
|
||||
echo "<b>".get_string("duedate", "assignment")."</b>: $strduedate<br />";
|
||||
echo "<b>".get_string("maximumgrade")."</b>: $workshop->grade<br />";
|
||||
echo "<b>".get_string("detailsofassessment", "workshop")."</b>:
|
||||
<a href=\"assessments.php?id=$cm->id&action=displaygradingform\">".
|
||||
get_string("specimenassessmentform", "workshop")."</a><br />";
|
||||
print_simple_box_end();
|
||||
echo "<br />";
|
||||
echo format_text($workshop->description, $workshop->format);
|
||||
print_simple_box_end();
|
||||
echo "<br />";
|
||||
workshop_print_assignment_info($workshop);
|
||||
// in Stage 1? - are there any teacher's submissions? and...
|
||||
// ...has student assessed the required number of the teacher's submissions ("satisfactory level" dropped 14/8/03)
|
||||
if ($workshop->ntassessments and (!workshop_test_user_assessments($workshop, $USER))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user