Moodle

alternatively cumulate points in forums

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor 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); }

Activity

Hide
Martin Dougiamas added a comment -

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); }

Show
Martin Dougiamas added a comment - 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); }
Hide
Michael Blake added a comment -

assign to a valid user

Show
Michael Blake added a comment - assign to a valid user
Hide
Peter Kupfer added a comment -

In my newer version of Moodle, I don't seem to have a mod/forum/mod.html, I only have a mod_form.php and I don't think line 135 is right for this.

Thanks.

Show
Peter Kupfer added a comment - In my newer version of Moodle, I don't seem to have a mod/forum/mod.html, I only have a mod_form.php and I don't think line 135 is right for this. Thanks.
Hide
Peter Kupfer added a comment -

Is this going to added to the main code?

Show
Peter Kupfer added a comment - Is this going to added to the main code?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: