Moodle

Error in Choice activity lib.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Choice
  • Labels:
    None
  • Environment:
    Any
  • Database:
    Any
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Cersion 2.0 Choice activity. File choice/lib.php, near line 444.

The statement:

$choice_option = $DB->get_record("choice_options", array("id" => $optionid));

fails in its attempt to get limit information for a choice option.

In my copy, I have substituted the expression: "$choice->maxanswers[$optionid];" to get the limit number, but the code seems to go out of its way to avoid that for some reason.

Activity

Hide
Dan Marsden added a comment -

it was working for me, but you're right - those extra sql calls aren't required - I've removed them now.

thanks for the report!

Show
Dan Marsden added a comment - it was working for me, but you're right - those extra sql calls aren't required - I've removed them now. thanks for the report!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: