LESSON_IDENTITY error - Am I doing something wrong?

LESSON_IDENTITY error - Am I doing something wrong?

Steve Zelenty -
回帖数:8
My first time trying to setup a Lesson, I came across this error. I tried making a True or False question, and it seemed to have been working right. Anyone have ideas? Substituted path for "my moodle dir" for security reasons. Thanks.

It briefly hits this page :

Notice: Undefined offset: 2 in "my moodle dir"/mod/lesson/action/insertpage.php on line 156
Inserted page

and then goes to this :

Notice: Use of undefined constant LESSON_IDENTITY - assumed 'LESSON_IDENTITY' in "my moodle dir"/mod/lesson/view.php on line 1588

Notice: Use of undefined constant LESSON_IDENTITY - assumed 'LESSON_IDENTITY' in"my moodle dir"/mod/lesson/view.php on line 1588
回复Steve Zelenty

Re: LESSON_IDENTITY error - Am I doing something wrong?

Mark Nielsen -
Whoops blush

The notice on 156 is very minor and should not effect your lesson creating process.  As for all the javascript, that is part of the theme header and I'm not sure how you got that.

Also, I just removed some code from the cvs that should not have been there.  This should fix your LESSON_IDENTITY problems.

The next build of moodle 1.5.2+ will have this fix.

Sorry to all that this may effect,
Mark
回复Mark Nielsen

Re: LESSON_IDENTITY error - Am I doing something wrong?

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
That's OK, Mark, these things happen.  Just so we know, though, does this mean Lesson in 1.5.2 is essentially unusable?  Does it warrant a 1.5.3 already?
回复Martin Dougiamas

Re: LESSON_IDENTITY error - Am I doing something wrong?

Mark Nielsen -
With debug off, the Notices will not show any more.  Although, there are 2 things that the users will continue to see:  a teacher would see is an extra link on the lesson editing screen that would not work (addidentitypage is the link name I believe) and students would see a time spent message while taking a lesson with Timed turned off in the lesson settings.  So moving to 1.5.3 would help to get rid of those without having users to hack their lesson code.  Other than these 2 issues, I believe that the lesson module is still functional.  Just has some extra code that does not belong in view.php.  But, in the end, I think moving to 1.5.3 would be best.

Thanks for being understanding,
Mark
回复Mark Nielsen

Re: LESSON_IDENTITY error - Am I doing something wrong?

Matt Taylor -

Your Post says this was fixed in 1.5.2+ which I just d/l'd  Monday (9/19/05).  Is there a patch available ? here is a screen shot of what i get

Any Ideas?

Error Screne Shot

回复Mark Nielsen

Re: LESSON_IDENTITY error - Am I doing something wrong?

Matt Taylor -

Im also seeing this strange timespent: 0:00 message in the corner of the lessons as they are viewed

see attached screen cap

附件 error2.JPG
回复Matt Taylor

Re: LESSON_IDENTITY error - Am I doing something wrong?

Mark Nielsen -
Your two posts are the same as the problem described above.  I just downloaded
Moodle 1.5.2+ and Lesson 1.5.X (from the activity modules page) and did not find the bad code in either of them.

Try replacing your lesson module code with lesson 1.5.X from the activity modules download page.

Cheers,
Mark