Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Deferred
-
Affects Version/s: 1.4.3
-
Fix Version/s: None
-
Component/s: Forum
-
Labels:None
-
Environment:All
-
Affected Branches:MOODLE_14_STABLE
Description
i want some forums to be marked cumulatively. If the assessed field of the forum table is 3, that means I want that forum to add not average the posting ratings. Here is the code ... currently requires manually setting the field value to 3.
around line 500 of mod/forum/lib.php, I changed the line
$return->grades[$currentuser] = format_float($total/$count, 2);
to
if ($forum->assessed==3) { $return->grades[$currentuser] = format_float($total, 2); }else{ $return->grades[$currentuser] = format_float($total/$count, 2); }
From Bruno Vernier (vernier at vc.bc.ca) Wednesday, 31 March 2004, 02:23 PM:
in mod/forum/mod.html, I added a third option so that we do not need to modify the database directly
$options[3] = get_string(ratingonlyteacherscumulative, forum, moodle_strtolower($course->teachers));
From Bruno Vernier (vernier at vc.bc.ca) Wednesday, 31 March 2004, 02:25 PM:
in lang/en/forum.php
in line 101 i updated the string
$string['ratingonlyteacherscumulative'] = 'Only $a can rate posts - cumulatively';
oh and for mod/forum/mod.html that was in line 135
From Bruno Vernier (vernier at vc.bc.ca) Thursday, 1 April 2004, 01:05 AM:
in mod/forum/lib.php in line 525, add the conditional:
if ($forum->assessed == 3) { $return->grades[$currentuser] = format_float((float)$total, 2); }else{ $return->grades[$currentuser] = format_float((float)$total/(float)$count, 2); }