Moodle

adding a lesson to the front page produces 'Trying to get property of non-object'

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8.1
  • Component/s: Lesson
  • Labels:
    None
  • Environment:
    Moodle 1.8 + (2007021503)
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

Failed to add a lesson to the front page. Offending line is in mod\lesson\mod_form.php 248:

if ($this->_cm->id != $mod->id)

I can't any references to the _cm variable so that may be a starting point.

Activity

Hide
Mike Street added a comment -

We are having this same issue with the Lesson module. Ours is:

"Notice: Trying to get property of a non-object in mod/lesson/mod_form.php in line 248"

Show
Mike Street added a comment - We are having this same issue with the Lesson module. Ours is: "Notice: Trying to get property of a non-object in mod/lesson/mod_form.php in line 248"
Hide
Mike Street added a comment -

Not that this explains why we had the problem, but a re-install managed to clear things up for us. We were also having many database errors with the Exercise and Lesson modules, but those are also gone now.

Show
Mike Street added a comment - Not that this explains why we had the problem, but a re-install managed to clear things up for us. We were also having many database errors with the Exercise and Lesson modules, but those are also gone now.
Hide
Mark Nielsen added a comment -

Thanks for the report!

Show
Mark Nielsen added a comment - Thanks for the report!

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: