Non-core contributed modules

CLONE -problem with Scheduler Add Slots

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.6
  • Fix Version/s: None
  • Component/s: Add a project here
  • Labels:
    None
  • Environment:
    Windows XP
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_16_STABLE

Description

Moodle 1.6 beta 5 on WinXP/Apache with Scheduler module from CVS.

When I try to add multiple time slots (using the Add Slots button), no slots are created.

When I Add Single Slot, the slot is created correctly.

Issue Links

Activity

Hide
Kenneth Newquist added a comment -

I'm running Moodle 1.7 with the current Scheduler (http://moodle.org/mod/data/view.php?d=13&rid=328) on Redhat Enterprise Linux 4 with PHP 4.3.9 and MySQL 4.1.20. I see the same error as was initially reported: if I add multiple slots using scheduler, no slots are created, but if I add a single slot, one is created.

I have all of Moodle's debuggers turned on, but it hasn't thrown any PHP errors.

Show
Kenneth Newquist added a comment - I'm running Moodle 1.7 with the current Scheduler (http://moodle.org/mod/data/view.php?d=13&rid=328) on Redhat Enterprise Linux 4 with PHP 4.3.9 and MySQL 4.1.20. I see the same error as was initially reported: if I add multiple slots using scheduler, no slots are created, but if I add a single slot, one is created. I have all of Moodle's debuggers turned on, but it hasn't thrown any PHP errors.
Hide
Kenneth Newquist added a comment -

I am seeing the same behavior on a different server with the current version of Moodle and the 5.x branches of PHP and MySQL.

Redhat Enterprise Linux 4
Moodle 1.7 Stable
Apache/2.0.52
PHP Version 5.2.0
MySQL 5.0.27-standard

Looking at my server error log, I see that a number of undefined variable errors were thrown by PHP.

PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 359, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15

PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 366, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15

PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 368, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15

PHP Notice: Undefined variable: exclusive in /mod/scheduler/view.php on line 373, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15

PHP Notice: Undefined variable: hasslots in /mod/scheduler/view.php on line 374, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15

PHP Notice: Undefined variable: exclusive in /mod/scheduler/view.php on line 495, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15

PHP Notice: Undefined variable: attended in /mod/scheduler/view.php on line 499, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15

PHP Notice: Undefined variable: displayyear in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15

PHP Notice: Undefined variable: displaymonth in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15

PHP Notice: Undefined variable: displayday in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15

I haven't taken a look at the code yet to see what might be going wrong, but I will soon.

Show
Kenneth Newquist added a comment - I am seeing the same behavior on a different server with the current version of Moodle and the 5.x branches of PHP and MySQL. Redhat Enterprise Linux 4 Moodle 1.7 Stable Apache/2.0.52 PHP Version 5.2.0 MySQL 5.0.27-standard Looking at my server error log, I see that a number of undefined variable errors were thrown by PHP. PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 359, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15 PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 366, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15 PHP Notice: Undefined variable: teacherid in /mod/scheduler/view.php on line 368, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15 PHP Notice: Undefined variable: exclusive in /mod/scheduler/view.php on line 373, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15 PHP Notice: Undefined variable: hasslots in /mod/scheduler/view.php on line 374, referer: [my moodle address]/mod/scheduler/view.php?action=addsession&id=15 PHP Notice: Undefined variable: exclusive in /mod/scheduler/view.php on line 495, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15 PHP Notice: Undefined variable: attended in /mod/scheduler/view.php on line 499, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15 PHP Notice: Undefined variable: displayyear in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15 PHP Notice: Undefined variable: displaymonth in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15 PHP Notice: Undefined variable: displayday in /mod/scheduler/view.php on line 500, referer: [my moodle address]/mod/scheduler/view.php?action=newmoveslot&id=15 I haven't taken a look at the code yet to see what might be going wrong, but I will soon.
Hide
Joshua Mathianas added a comment -

This is a fix to allow the use of the Add slots in versions of Moodle pre 1.7. The scheduler will not work to enable scheduling due to obsolete tables error. I will try to enable it to work on 1.7 because I will be updating the server to 1.7 in the near future. When I get a fix made for 1.7 I will post it.

To enable this fix place the view.php file in the zip file attached with the current one located in mod/scheduler.

Show
Joshua Mathianas added a comment - This is a fix to allow the use of the Add slots in versions of Moodle pre 1.7. The scheduler will not work to enable scheduling due to obsolete tables error. I will try to enable it to work on 1.7 because I will be updating the server to 1.7 in the near future. When I get a fix made for 1.7 I will post it. To enable this fix place the view.php file in the zip file attached with the current one located in mod/scheduler.
Hide
Paulo Matos added a comment -

Hi Joshua!
I hit the bug as well, and I look at your code and there's one change I can't understand at all:

<code>
< is yours
> is orig
953c930
< } else if ($slot->hideuntil >=time()){ --- > } else if ($slot->hideuntil <=time()){
</code>

this change reverts the logic, or ma I missing something here?

Show
Paulo Matos added a comment - Hi Joshua! I hit the bug as well, and I look at your code and there's one change I can't understand at all: <code> < is yours > is orig 953c930 < } else if ($slot->hideuntil >=time()){ --- > } else if ($slot->hideuntil <=time()){ </code> this change reverts the logic, or ma I missing something here?
Hide
Paulo Matos added a comment -

Answering to myself: I was right, tested and the logic was reverted. The slots should not be shown if set Not show until n days before!
This was tested under 1.6.
As a side effect I just found out that my scheduler_slots table missed some upgrades but can really know when.
Please look at the patch.

Show
Paulo Matos added a comment - Answering to myself: I was right, tested and the logic was reverted. The slots should not be shown if set Not show until n days before! This was tested under 1.6. As a side effect I just found out that my scheduler_slots table missed some upgrades but can really know when. Please look at the patch.
Hide
Paulo Matos added a comment -

Just discovered that 'displayfrom' and 'emailfrom' params where missing, corrected now.

Show
Paulo Matos added a comment - Just discovered that 'displayfrom' and 'emailfrom' params where missing, corrected now.
Hide
Kenneth Newquist added a comment -

Paulo – have you had a chance to look at the 1.7 iteration?

Show
Kenneth Newquist added a comment - Paulo – have you had a chance to look at the 1.7 iteration?
Hide
Paulo Matos added a comment -

Seems I miss this report, no I haven't look into 1.7! Have no time to setup a test instance for this.

Show
Paulo Matos added a comment - Seems I miss this report, no I haven't look into 1.7! Have no time to setup a test instance for this.

People

Vote (5)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: