forum rating: MDL-18044 notice sometimes when a forum is rated, also XHTML strict problems and fix incorrect help text.

This commit is contained in:
tjhunt 2009-01-27 06:35:56 +00:00
parent bb58e708f6
commit 853a3eefd4
3 changed files with 7 additions and 4 deletions

View File

@ -42,6 +42,7 @@
echo text_to_html($scale->description);
print_simple_box_end();
close_window_button();
print_footer('empty');
exit;
}
}
@ -52,7 +53,7 @@
if (has_capability('moodle/course:managescales', $context)) {
echo "<p align=\"center\">(";
print_string("scalestip");
print_string('scalestip2');
echo ")</p>";
}
@ -94,6 +95,6 @@
}
close_window_button();
exit;
print_footer('empty');
?>

View File

@ -1355,6 +1355,7 @@ $string['scalescustomno'] = 'No custom scales have been created yet';
$string['scalesstandard'] = 'Standard scales';
$string['scalestandard'] = 'Standard scale';
$string['scalestip'] = 'To create custom scales, use the \'Scales...\' link in your course administration menu.';
$string['scalestip2'] = 'To create custom scales, click the Grades link in the course administration menu, then choose Edit, Scales.';
$string['schedule'] = 'Schedule';
$string['scheduledbackupsinactive'] = 'Scheduled backups haven\'t been enabled by the site admin';
$string['scheduledbackupstatus'] = 'Scheduled backup status';

View File

@ -5264,7 +5264,9 @@ function forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode,
$ratingsmenuused = false;
$ratingsformused = false;
if ($forum->assessed and isloggedin()) {
if ($ratings->scale = make_grades_menu($forum->scale)) {
if ($scale = make_grades_menu($forum->scale)) {
$ratings =new object();
$ratings->scale = $scale;
$ratings->assesstimestart = $forum->assesstimestart;
$ratings->assesstimefinish = $forum->assesstimefinish;
$ratings->allow = $canrate;
@ -5293,7 +5295,6 @@ function forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode,
}
}
$post->forum = $forum->id; // Add the forum id to the post object, later used by forum_print_post
$post->forumtype = $forum->type;