Non-core contributed modules

GBPv2: Error trying to get property of non-object error around line 314 in /grade/lib.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8.2
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

This error is only shown when the debug mode is on but nevertheless needs to be taken care of. It is caused by trying to get the module information from the grade events which technically are not modules.

Activity

Hide
Anthony Borrow added a comment -

this line was triggering the error:

$all_categories["$cur_category"]["$instance->name"]['modname'] = $modname->name;

Show
Anthony Borrow added a comment - this line was triggering the error: $all_categories["$cur_category"]["$instance->name"]['modname'] = $modname->name;
Hide
Anthony Borrow added a comment -

modname for grade events is now 'grade' rather than an empty string.

Show
Anthony Borrow added a comment - modname for grade events is now 'grade' rather than an empty string.
Hide
Anthony Borrow added a comment -

James reports: it [the patch] has fixed the 314 problem.

While testing I found a similar error message:

Notice: Trying to get property of non-object in
/srv/www/sites/studentmoodle/htdocs/moodtest/grade/lib.php on line
2393

Notice: Trying to get property of non-object in
/srv/www/sites/studentmoodle/htdocs/moodtest/grade/lib.php on line
2408

I'm not sure if they are related though they seem to be caused by
Graded Events. I deleted all events from category and erro went away.
Re-added an event and it came back.

Error appeared when I was in view grades and clicked the [category
name] link to see individual marks for that category.

Show
Anthony Borrow added a comment - James reports: it [the patch] has fixed the 314 problem. While testing I found a similar error message: Notice: Trying to get property of non-object in /srv/www/sites/studentmoodle/htdocs/moodtest/grade/lib.php on line 2393 Notice: Trying to get property of non-object in /srv/www/sites/studentmoodle/htdocs/moodtest/grade/lib.php on line 2408 I'm not sure if they are related though they seem to be caused by Graded Events. I deleted all events from category and erro went away. Re-added an event and it came back. Error appeared when I was in view grades and clicked the [category name] link to see individual marks for that category.
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: