Moodle

Edit categories and items error message

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 1.9.10
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Since upgrading to 1.9.4+ build 20090505 I obtain the following error message on the edit categories and items page (simple and full view):

Notice: Trying to get property of non-object in /var/www/19/moodle/grade/edit/tree/lib.php on line 676

Activity

Hide
Nicolas Connault added a comment -

The only way you could possibly get this message is if one of the grade items in the course you are looking at is pointing to a scale that no longer exists in the database. Please look at your grade items and find the one that uses such a scale, and change the scale.

I don't know how the scale could have been deleted, but it's obvious that it has. Another possibility is that somehow the grade items was set to point to a scale that never existed at all.

Please fiddle around with your grade item and see if you can get the message to go away then come back. My guess is that once the message has disappeared, you won't be able to make it come back.

Show
Nicolas Connault added a comment - The only way you could possibly get this message is if one of the grade items in the course you are looking at is pointing to a scale that no longer exists in the database. Please look at your grade items and find the one that uses such a scale, and change the scale. I don't know how the scale could have been deleted, but it's obvious that it has. Another possibility is that somehow the grade items was set to point to a scale that never existed at all. Please fiddle around with your grade item and see if you can get the message to go away then come back. My guess is that once the message has disappeared, you won't be able to make it come back.
Hide
Nicolas Connault added a comment -

Until I get a way to reproduce this, I can't fix it.

Show
Nicolas Connault added a comment - Until I get a way to reproduce this, I can't fix it.
Hide
Andrew Davis added a comment -

Although I couldn't reproduce the behaviour either based on Nicolas' comment I've committed a fix for this that should hopefully prevent the error in future. Reopen this issue if it reoccurs

Show
Andrew Davis added a comment - Although I couldn't reproduce the behaviour either based on Nicolas' comment I've committed a fix for this that should hopefully prevent the error in future. Reopen this issue if it reoccurs
Hide
David Mudrak added a comment -

Thanks Andrew for the patch. IMHO it would be good to analyse a bit more how this could even happen.

Show
David Mudrak added a comment - Thanks Andrew for the patch. IMHO it would be good to analyse a bit more how this could even happen.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: