Error viewing Scheduler appointments in Moodle 2.6+ as a teacher (when not in edit mode)

Error viewing Scheduler appointments in Moodle 2.6+ as a teacher (when not in edit mode)

by Robert Bass -
Number of replies: 3

We upgraded to Moodle 2.6 a week ago (late Nov. 2013).  Our Scheduler activities are now only viewable by the teacher if they "Turn editing on".  If they turn it off and try to view the appointments, the page begins to load but only the theme header appears.  The web server log reports:

[Tue Dec 03 15:29:01 2013] [error] [client --------] PHP Fatal error:  Class 'moodleform' not found in /var/www/moodle/mod/scheduler/slotforms.php on line 17, referer: http://-----/moodle/course/view.php?id=5&section=4

This line in the php file is a class declaration extending moodleform.  The php sends a partial HTML stream to the browser ending with...

   div class "region-content"
      div role "main"         span "maincontent" and close span
  ...then nothing...

Students can see the Scheduler activity fine, with one minor problem: the image moodle/pix/t/switch_plus.gif is not found.  In the pix/t folder the images are .svg and .png only.

Are we the only ones seeing this?  i.e. is it unique to our server?

Server: Ubuntu 12.04.3, Apache 2.2.22, PHP 5.3.10-1ubuntu3.8, Moodle 2.6+ build 20131122, Scheduler 2.5.0 downloaded and installed 2013-12-02 just to be sure (files dated 2013-09-28)

Scheduler README.txt states the following which is directly related to our error...

=== Release notes ===

--- Version 2.5 ---

Intended for Moodle 2.5 and later.

Module adapted to API changes Moodle core.
"Add slot" and "Edit slot" forms refactored, now based on Moodle Forms.
Language packs migrated to AMOS, removed from plugin codebase.

 

 

Average of ratings: -
In reply to Robert Bass

Re: Error viewing Scheduler appointments in Moodle 2.6+ as a teacher (when not in edit mode)

by John Brine -

We have the same problem described here: "Our Scheduler activities are now only viewable by the teacher if they "Turn editing on".  If they turn it off and try to view the appointments, the page begins to load but only the theme header appears."

Our system:

MAC OS X 10.9
Apache/2.2.24
PHP/5.5.6
Moodle 2.6
Scheduler 2.5,2.6

 

In reply to Robert Bass

Re: Error viewing Scheduler appointments in Moodle 2.6+ as a teacher (when not in edit mode)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Hello Robert,

thanks for pointing this out. I have, for some reason, been unable to reproduce this problem. However, others have found the same behaviour (and thankfully suggested a fix).

I have now included the fix on the github repository, in the master and MOODLE_25_STABLE branches. Can you check whether the latest code from there resolves your problem?

Best wishes
Henning

In reply to Henning Bostelmann

Re: Error viewing Scheduler appointments in Moodle 2.6+ as a teacher (when not in edit mode)

by Robert Bass -

Hello Henning,

Greetings from North Idaho, US.

It looks like 2 lines were changed in the slotforms.php file (a call to require_once for the form module and a tweaked/simplified "if clause" later on).  This has indeed eliminated the symptoms we were experiencing and the Scheduler activity appears as desired even when not in edit mode.  The Apache error log is also clean (no PHP warnings or errors).

Thank you very much for the fix.  Our teachers will be delighted.

Sincerely,
rob