Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49961

Undefined variable: outcomeexists when adding a forum with an outcome, but no rating

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 2.8.3
    • Course, Forum
    • None
    • MOODLE_28_STABLE

      To reproduce:

      Create a course with outcomes.
      Add a new forum and associate it with an outcome, but do not set ratings for the forum (this will result in no grade item being created).
      When saving a warning will result:

      Notice: Undefined variable: outcomeexists in /PATH/modlib.php on line 296

      It's basically caused by having outcomeexists defined in the if($items) because an unrated forum will have no grade item. I suspect it would be safe to just move the declaration of outcomeexists outside the if statement.

            Unassigned Unassigned
            daniel.barnett Daniel Barnett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.