Updated scheduler module

Updated scheduler module

by Gustav W Delius -
Number of replies: 157
I have updated the scheduler module in contrib/scheduler to incorporate the extensions contributed by Richard Haywood, see http://moodle.org/mod/forum/discuss.php?d=2468&parent=145437. This now needs some extensive testing.
Average of ratings: -
In reply to Gustav W Delius

Re: Updated scheduler module

by N Hansen -
Gustav-This doesn't include the location information that Richard included, and which I improved on. Also, it doesn't include the nice email reminders that his sends out automatically to students before their appointment.
In reply to N Hansen

Re: Updated scheduler module

by Gustav W Delius -
Nichole, I did indeed forget to include your improvements. Could you perhaps add them to the new view.php and email them to me?

I am not aware of having deleted the email reminders facility from Richard's code. I'll have another look later.
In reply to Gustav W Delius

Re: Updated scheduler module

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Gustav,

Nice to see you here again smile

You also forgot to include the french language files I sent you per mail. You'll find them again in attachment.

Thanks for your work.
In reply to Nicolas Martignoni

Re: Updated scheduler module

by Gustav W Delius -
Hi Nicolas, thank you very much for the translation for French. It is now in CVS. Sorry it took me so long.
In reply to Gustav W Delius

Re: Updated scheduler module

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
No problem, we all know that we have also a real life outside of Moodle big grin

Cheers !
In reply to Gustav W Delius

Re: Updated scheduler module

by N Hansen -
Gustav-Just wanted to let you know I will take a look at the things I added and see if I can add them into the standard, but it will have to wait until next month as I am off to Egypt in a couple hours.
In reply to N Hansen

Re: Updated scheduler module

by Chardelle Busch -
Picture of Core developers
Hi Gustav,

I just installed your "new and improved" scheduler on a 1.6 test site.  Fantastic, I love it.  Just a couple of things:

You have a new field - "location".  When I type something in there, where is it supposed to show up?  I don't see it anywhere.

Also, I've noticed some new errors with debug on.  I don't know if this is something new that has been introduced in 1.6.  Basically, it doesn't like it if something "hasn't happened yet".  With the scheduler, as a teacher, if I have created a time slot for a student that has not been checked yet I get errors from the calendar (but I don't get these as the student) and the event doesn't show up.  Do you know what this is all about?

For the upcoming events block I get these:

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 866

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 872

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 874

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 880

And for the calendar view I get these:

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 465


Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 473
05:00 PM 
Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 479


Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 483

Notice: Trying to get property of non-object in C:\moodle\moodle\calendar\lib.php on line 484


In reply to Chardelle Busch

Re: Updated scheduler module

by Gustav W Delius -
Hi Chardelle, the improvements to the scheduler module are not mine, they are by Richard Haywood. I only committed them to CVS. I will investigate the error with the calendar when I get a chance, but this will not be any time soon. If someone else can provide bug fixes then please email them to me and I'll be happy to commit them.
In reply to Gustav W Delius

Re: Updated scheduler module

by Paulo Matos -
Only recently I started to use scheduler module, but I noticed a big lack on it - no backups!

I'm attaching backuplib.php and restorelib.php to fill the blank.
This was done against scheduler version 2004091100.

Please take a look at the code,test and if possible merge it.

Regards,

Paulo Matos
In reply to Paulo Matos

Re: Updated scheduler module

by Gustav W Delius -
Paulo, thank you very much for writing the backup and restore functions. I have extended them to include the new database fields that were added by Richard Haywood recently and have submitted them to CVS. Unfortunately I am too tired to do any testing of the code. I may well have introduced mistakes while updating your code.
In reply to Gustav W Delius

Re: Updated scheduler module

by Paulo Matos -
I'll take a look on the CVS version and see if something is missing. THen I'll get back to you.
In reply to Paulo Matos

Re: Updated scheduler module

by Paulo Matos -
Hi Gustav!

I noticed an insignifcant detail (since I think order does not
matter) in backuplib.php: the new field 'schedulermode' is defined
_before_ 'teacher' on sql table, and backuped _after_!

Just swap lines 41,42 or apply patch attached.

I reviewed your changes and besides this everything is fine.

Regards,

Paulo Matos
In reply to Gustav W Delius

Svar: Updated scheduler module - error report

by Anders Berggren -

Hi Gustav,

These are the error messages I get with this version.
During install:
Parse error: parse error, unexpected T_VARIABLE in c:\easyphp\www\moodle\mod\scheduler\lib.php on line 295
When trying to use the module:
Fatal error: Maximum execution time of 30 seconds exceeded in c:\easyphp\www\moodle\lib\datalib.php on line 824
EasyPHP 1.7, WIN XP, Moodle 1.6
In reply to Anders Berggren

Re: Svar: Updated scheduler module - error report

by Jacques Thielens -
For : Parse error: parse error, unexpected T_VARIABLE in c:\easyphp\www\moodle\mod\scheduler\lib.php on line 295

change line 294 :
$supervisorEvent->visible = 1

to
$supervisorEvent->visible = 1;
In reply to Anders Berggren

Re: Svar: Updated scheduler module - error report

by Gustav W Delius -
I finally got around to testing this new version of the scheduler module a bit and made a large number of small fixes and committed them to CVS.

The code has been extended many times now and this module is really ripe for a complete rewrite. Don't be surprised to find many more bugs.

The module also has a large number of features and it is not immediately obvious how to use them, so if someone familiar with some uses would put teacher documentation into MoodleDocs at http://docs.moodle.org/en/index.php?title=Scheduler that would be very useful.


In reply to Gustav W Delius

Re: Svar: Updated scheduler module - error report

by Sean Pearson -
I am receiving the following error:

Fatal error: Class 'tabobject' not found in C:\Apache2\htdocs\moodle\mod\scheduler\view.php on line 105

Does anyone know a fix for this? 

Thanks
In reply to Sean Pearson

Re: Svar: Updated scheduler module - error report

by Gustav W Delius -
Sean, I think you are running an old version of Moodle. If you update your Moodle installation (which you should do frequently anyway to always have the latest security fixes) this problem should go away.
In reply to Gustav W Delius

Teacher Documentation

by Mathias Moser -
I am student of the University of Applied Science in St.Pölten/Austria and we are working on a project with the aim to improve our Moodle eCampus.

My question:
Does anyone already work on this teacher documentation for the scheduler module(version 1.2)?? If not, we would do this.

Greets

Mathias Moser
In reply to Gustav W Delius

Vast: Updated scheduler module

by Ari Tahvanainen -
Hi,

Here is alphabetical list of language variables (english).

Excel is nice tool for orderingHymy

Soon  comes Finnish translation, when our translation is updated from autumn.  Development  has happened.

- ari -
In reply to Gustav W Delius

Vast: Updated scheduler module

by Ari Tahvanainen -
Hi,

Some small bugs in Statistics -page:
- "Duration", "Appointments" are not language variables and "Occurances" is not even in language file
- pressing Continue-button gives error "Course Module ID was incorrect"

- ari -
In reply to Ari Tahvanainen

Re: Vast: Updated scheduler module

by Gustav W Delius -
Ari, thanks for pointing that out. There are indeed many hard-coded language strings in view.php. This was contributed code and I committed it without checking it carefully. If you could fix the code and send me the corrected file then I will commit it.
In reply to Gustav W Delius

Re: Updated scheduler module (Additional check required)

by Paulo Matos -
Hi!

Recently one of my users (which I could not find out who smile
created a scheduler with 15857286 slots (yes, 15 Milion).

I took a while to figure out how he did it, I found it...
if I say the slot duration is something like 0.001 minutes
in one hour it will produce 60000 slots...

A solution I find to deal with this is to check the duration
paramenter, something like:

$duration=intval($duration);

however this can only be done when duration < 1, where it enters
the partial numbers, or simply by limiting it to a minimum value
of 5 minutes.

See attached patch.

Cheers,

--
Paulo Matos
In reply to Paulo Matos

Re: Updated scheduler module (Additional check required)

by Gustav W Delius -
Thanks Paulo, I have committed your suggested change to force the duration to be an integer.
In reply to Gustav W Delius

Re: Updated scheduler module

by Paul Conroy -
I am getting the following error message when saving my choice:

Fatal error: Call to undefined function: get_supervisor() in /hsphere/local/home/tothje/norrisroadtosuccess.com/mod/scheduler/lib.php on line 232

Any thoughts or solutions?


In reply to Paul Conroy

Re: Updated scheduler module

by Gustav W Delius -
Paul, that problem was fixed in CVS a few weeks ago. If you download the latest version this particular problem will be gone. But there may of course be many others.
In reply to Gustav W Delius

Re: Updated scheduler module

by Patrik Nilsson -
I have a small problem with the scheduler module. It seems to work beside one small detail. If I make timeslots and need to remove a time. the remove link is not there, only a change link. And its the new scheduler under download and moodle 153. Anyone else having this problem or anyone know what could be wrong?
In reply to Patrik Nilsson

Re: Updated scheduler module

by Gustav W Delius -
Hi Patrick, I was unable to reproduce your problem at firs so I looked at the code. It turns out that only the teacher who created the slot can delete it. So if you created the slot under a different username or another teacher created the slot then the "Delete" link does not show. If you are the admin then you could log in as the teacher who created the slots and you should then be able to delete them.
In reply to Gustav W Delius

Re: Updated scheduler module

by Patrik Nilsson -
I did as admin create the slots at first and I figured it could be that was the problem. So I made the teacher create the complete module and slots but still no delete link. I looked at the files in the mod dir. There is a move.html and a mod.html but there is no delete.html, should there be one?
In reply to Patrik Nilsson

Re: Updated scheduler module

by Patrik Nilsson -
I removed the mod and reinstalled it and now I got the delete link. Not sure what was wrong before. But thanks anyway.
In reply to Gustav W Delius

Feature Suggestion / Error report

by Fredrik Erlandsson -
I can't get the "allow multiply students per slot" to work. It just don't seem to be saved.

It would be nice if the teacher could specify the maximum numbers of students per slot.
I'm going to use moodle and the scheduler module to let students book them self into laboratory groups, in a normal laboratory/computer room. On each occasion I only can accept 8 groups á 2 students each, is this possible to solve?


In reply to Gustav W Delius

Re: Updated scheduler module

by Raúl Pérez -
Hola Gustav besides I have added a field to the BBDD called commentaries that the possibility gives to the pupil of writing the motive of the meeting with the teacher.
East sees it as a link that a pop opens up
In reply to Raúl Pérez

Re: Updated scheduler module

by Chardelle Busch -
Picture of Core developers
Hi Raul,

Could you please post your changes for the commentaries (notes) addition. Maybe you could attach a file with the database field you added, and changes you made.

Thanks
In reply to Chardelle Busch

Re: Updated scheduler module

by Raúl Pérez -

Hello Chardelle,

Even I have not sent the changes because I don´t have access to SourceForge.net, also I have done a brief summary of the changes that I have realized in my module of the sheduler but this one in Spanish

In reply to Gustav W Delius

Re: Updated scheduler module

by Raúl Pérez -
Hola Gustav, in the attached zip sending(parcel) different modifications that I have realized on the module scheduler, I have included a field where the pupils could give his(her,your) opinion for it I have added I cosay to call comentarie.php, a lateral calendar for the teacher, and have made the field obligatory location, I like to know that they seem to you
In reply to Gustav W Delius

Re: Updated scheduler module

by Raúl Pérez -

hello I have added a Link that allows to select all the students to arrange one reunion of the table of the students del course

Attachment seleccionar_todos.gif
In reply to Gustav W Delius

Re: Updated scheduler module

by Raúl Pérez -

There is a bug in the option ' multiple Allow students per slot? ', this option does not work , and other bug in this code

slot->exclusive = $exclusive;

$slot->student = $bookstudent;

$slot->notes = $noteMove;

$slot->appointmentlocation = $appointmentlocation;

$slot->attended = $attended;

$slot->hideuntil = make_timestamp($displayyear, $displaymonth,$displayday, 6, 0);

$slot->exclusive = scheduler_noneexclusive($scheduler->id, $starttime, $slot->starttime + $slot->duration*60);

In reply to Raúl Pérez

Multiple allow students per slot

by Mathias Moser -
Hi!

In the next days we'll upload the german language file for the scheduler.

Our plan for the next weeks is to fix the bug with the "multiple Allow students per slot" in addition with a field for the maximal amount of students per slot.
Hopefully we can fix this soon.

If anyone works already on this and has some tipps, please post them here:
http://moodle.org/mod/forum/discuss.php?d=44192

Greets Mathias
In reply to Mathias Moser

Re: Multiple allow students per slot

by Sébastien Bauer -
Hi

Helped by Nicolas, I've completed the traduction of the scheduler (great tool, by the way).

A few entries, though, don't appear to be in the "scheduler.php" file and are not translated (see attached gif) :

Students, Staff, Group Size, Occurances, Appointments, Duration

(in pages studentbreakdown, staffbreakdown, etc).

Does anyone know where I can find them? Spanish and german translators perhaps?

Raúl, ¿has encontrado el mismo tipo de problema? ¿Tuviste que traducir otro fichero que el /lang/es_es/scheduler.php?

(I don't have to mention that I do have translated all the entries of scheduler.php)

Thanks for your help.

SB

In reply to Sébastien Bauer

Re: Multiple allow students per slot

by Mathias Moser -
Attached you'll now find the German language files for the scheduler module!

Greets from Austria!

In reply to Mathias Moser

Re: Multiple allow students per slot

by Brian Gray -
The version of Scheduler in CVS does not seem to be the most recent.

I can't get it to work with 1.6 beta 5.

Where can I get an up-to-date copy to experiment with?
In reply to Brian Gray

Re: Multiple allow students per slot

by Mathias Moser -

Hi, we are working at the moment on some improvements on the scheduler module.

multiple allow students already works, in addition we added a fiel for the maximum number of students per slot. also each student/teacher sees how many places are free.

we will post this improved and full working scheduler in the next 14 days.

we also made a teacher documentation in englisch and german to instruct the teachers how to use the module.

hope we help some guys of you with our work...

In reply to Mathias Moser

Re: Multiple allow students per slot

by Brian Gray -
Mathias -

Thanks for the project update.  If you need people to do testing of your changes, please let me know.  I'm available most of the summer except for the first week of July.

bkg

In reply to Mathias Moser

Re: Multiple allow students per slot

by Howard Taylor -

Sounds like some great improvements Mathias.

Ditto.  If you need some more testing done, please count me in.

 

In reply to Mathias Moser

Re: Multiple allow students per slot

by Howard Taylor -
For info: I will be running version 1.6 some time in the next 7 days.
In reply to Mathias Moser

Re: Multiple allow students per slot

by Katarzyna Potocka -
Hi,
im from vienna and would like to know if you fixed the bug with the multiple allow students per slot. I would need this.
thanks, ...
In reply to Katarzyna Potocka

Re: Multiple allow students per slot

by Markus Knierim -
Hi Katarzyna,

I posted a fix for this bug (and a few others) further below in this thread (http://moodle.org/file.php/5/moddata/forum/27/305175/appointment.zip)

Please let me know if it works for you.

Cheers,
Markus
In reply to Markus Knierim

Re: Multiple allow students per slot

by Katarzyna Potocka -
hello,
i've already tried something different, but can you tell me, if you look into your calendar as teacher, do you see the detailed presentation of each appointment or schedulerslot in the daily view.
Because my students see them but I can't (as teacher).
In the database there is missing the instance-entry for the event added for the chosen slot by a student.
Do you see the entry in the calender???

Thanks a lot,
Kasia
In reply to Markus Knierim

Re: Pages of slots in scheduler/appointment disappear in 1.7

by J. Chan -

Hi

I installed the latest appointment /scheduler mod on my moodle version 1.7.

The module seems to be working similar to that on 1.6 except one thing ---- the page numbers underneath the slots are missing.

Does anyone see the same thing?

At the moment, I have to paste "&page=&start=7" etc. at the end of the URL to make the pages show. (Note: I replace the 7 with other page number).

Thanks in advance.

Cheers

James

In reply to Gustav W Delius

Re: Updated scheduler module

by Raúl Pérez -

Hi, I have a little problem,  I don´t understand the usefulness the field $slot->exclusive, because don´t alow that several studets select the same slot.

Could anyone help me¿??

 thanks

In reply to Gustav W Delius

Re: Updated scheduler module

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Gustav,

In attachment you'll find an update to the french lang file of the scheduler module. Credits for the update goes to Sébastien Bauer

This file is in ISO-latin-1 encoding. Do you want I upload an UTF-8 version?
In reply to Nicolas Martignoni

Re: Updated scheduler module

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi again,

This note to inform you that from now on, Sébastien Bauer will take care of the french translation of your module. He'll post updates of the french translation here.

Thanks to him wink
In reply to Gustav W Delius

Re: Updated scheduler module

by Steve S. -
I have installed this module in 1.5.3 but I can't seem to figure out how to get it to work.

What I'd like to use it for is to have students schedule times to do presentations in class. However, I can't seem to set it up to allow students to schedule their own time. I tried to create slots, but when students go to the schedule, they see a message saying that there are no slots created and that they have to contact the instructor of the course.

Any suggestions?

Thanks,
Steve
In reply to Gustav W Delius

Students cannot see Location of Meeting in scheduler

by Lee LikMeng -
Hi, I implemented the scheduler for one of my training classes and my "students' ended up waiting for me at my office instead of the IT Lab.

After checking, I found out that even though I have set the "Location" when setting up the slots, the students can only click to select a time slot but the information on location of meeting is not shown to the student.

I hope the person in-charge of the programming can take note.

Thanks.
In reply to Lee LikMeng

Re: Students cannot see Location of Meeting in scheduler

by Mathias Moser -

Hi, yes this problem exists in the version in the cvs. (scheduler 1.5 i think)

We are publishing a new version of the scheduler until the end of the next week where this problem is already solved.

Greets

In reply to Mathias Moser

Cannot add slots

by Markus Knierim -

Hi Mathias,

just FYI: I just installed the CVS version of scheduler on a new 1.6+ installation, and I don't seem to be able to add multiple slots. After filling in the "Add slots" form and clicking on "Save changes", it says "0 slots have been added". Adding single slots works, though. (The current version from CVS does function properly on my 1.5.3 installation.)

Maybe this is something you are already looking into while getting the new version ready. wink Anyway, thanks for your effort! big grin

Markus

In reply to Markus Knierim

Re: Cannot add slots

by M Y -
Same problem on my installation! sad

It used to work in 1.5.4, great job!

--Martin
In reply to Mathias Moser

Re: Students cannot see Location of Meeting in scheduler

by Mathias Moser -
Hi!

Attached you find our modified version of the scheduler.
I'm sorry that i have not the time to list up the changes. Try it and you'll see! wink

Greets
Mathias
In reply to Mathias Moser

Re: Students cannot see Location of Meeting in scheduler

by Bhupinder Singh -

Hi Mathias,

A great odule .

Is it available for use in Windows.

Could you guide me to a download location.

Thanks again

Garry

 

In reply to Mathias Moser

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -
Mathias -

I installed the version of Scheduler (scheduler-1_3.rar) that you posted on July 2.  It still does not work on my system (described below).  When I try to create a range of slots, I get the message: "0 slots have been added". 

A screen-shot of the data-entry screen is attached.  Amy I doing something wrong?

Adding a single slot works as expected.

My system:
  • Moodle 1.6+ (updated today)
  • RedHat Linux ES-3
  • Apache 2.0.46
  • MySql 5.0.21
  • PHP 4.3.2
Attachment add-slot.jpg
In reply to Brian Gray

Re: Students cannot see Location of Meeting in scheduler

by Mathias Moser -
Looks good what you did. Normaly it should work, i'm sorry, but i realy don't know what the problem could be.

In reply to Mathias Moser

Re: Students cannot see Location of Meeting in scheduler

by M Y -
I'm no expert but could it be something like the change to unicode? or a change in the way Moodle handles past modules?

I have no idea. I have the same problem, biggest part is that it doesnt give any errors?!?

Good Job, great module, very useful

--Martin
In reply to Mathias Moser

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -
Mathias -

I've done some debugging to try to track down the problem.  I've made some progress, but I still have a question or two...

The problem appears to be in file view.php.  in the version of the file you posted on July 2, there are several variables that are not initialized.  See the code snippet below.  I added what I believe to be the correct initializations at the top of the file, and most of the module now works for me.

Is it possible that you distributed the wrong version of that file?  I can't imagine that the module would work with this many statements apparently missing.

I know that there is still a bug in the code that I added.  The "Add Slots" form allows me to create slots for any of the course teachers.  The code below always assigns the slot to the teacher currently logged in - not the teacher selected on the form.  (It is done that way because I don't know enough about PHP to know how to extract the appropriate teacherID.)

Here's the code I added - just below the last of the initialization statements at the top of the file:

// added these
    $yearend = optional_param('yearend');
    $monthend = optional_param('monthend');
    $dayend = optional_param('dayend');
    $monday = optional_param('monday');
    $tuesday = optional_param('tuesday');
    $wednesday = optional_param('wednesday');
    $thursday = optional_param('thursday');
    $friday = optional_param('friday');
    $saturday = optional_param('saturday');
    $sunday = optional_param('sunday');
    $appointmentlocation = optional_param('appointmentlocation');
    $exclusive = optional_param('exclusive');
    $maxstudents = optional_param('maxstudents');
    $hasslots = optional_param('hasslots');
    $emailfrom = optional_param('emailfrom');
    $displayfrom = optional_param('displayfrom');

    // this is not right.  It always assigns teacher logged in
    //    instead of the teacher selected on the form
    $teacherid = $USER->id;

// end add

Please review and comment.  I'm a novice PHP programmer, and welcome your thoughts.

bkg

In reply to Brian Gray

Re: Students cannot see Location of Meeting in scheduler

by Steve Power -

Brian

Thank you for this. I have been experiencing the same problem and justr applied your additions. I then made a small change which now works for me. I am a very inexperienced PHP coder so I just changed things to see if they worked. I don't know why but they seem to have done.

I changed your line:
    $teacherid = $USER->id;
to
    $teacherid = optional_param('teacherid');
and now the selected teacher appears for me at least.

Thanks again for this.

Regards
Steve

In reply to Steve Power

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -
Steve -

I made the change you suggested, and it does get the correct teacher's name into each slot.

However, In my testing I was not able to create time slots for two different teachers for the same time.  The error mesage was "Slot Exists".  I'll look into that problem later today...

bkg
In reply to Brian Gray

Re: Students cannot see Location of Meeting in scheduler

by Steve Power -

Brian

You obviously tested more than I did. I will try to look at this tomorrow too.

Regards
Steve

In reply to Steve Power

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -
Steve -

My testing was limited to that one thing, because I have a need for it...

I have made some progress.  I added a bit to the SQL query used to look for conflicts.  In view.php, in case 'savesession' (near line 400), I added the line in red below.

            // Check overlapping
                $sql = "SELECT count(*) as tabCount FROM ". $CFG->prefix . "scheduler_slots WHERE scheduler = '". $scheduler->id ."'";
                // bkg next line added  to allow multiple teachers to schedule overlapping slots. bkg.
                $sql .= " AND teacher = '".$teacherid."'";
                $sql .= " AND (";

This allows me to add slots for different teachers with overlapping times.  Teachers can see the slots for all teachers as expected.  But...

In some cases, when a student views the available slots, only the slots for the last teacher (as defined by the course's teacher list) are shown.  The problem is in the code shown in red below (view.php, near line 1180)

            foreach($slots as $slot) {
                if ($slot->student == 0 && $slot->starttime+(60*$slot->duration) < time()) {
                    // This slot is in the past and has not been chosen by any student, so delete
                    delete_records('scheduler_slots', 'id', $slot->id);
                    continue;
                }
                $startdate = scheduler_userdate($slot->starttime,1);
                $starttime = scheduler_usertime($slot->starttime,1);
                $endtime = scheduler_usertime($slot->starttime+($slot->duration*60),1);
                if ($startdate == $previousdate ) {
                    $startdate = '';
                    if ($slot->starttime == $previoustime) {
                        continue;
                    }
                }

If two teachers have created time slots with the same start time, the slot for one of the teachers is suppressed by the "continue" statement.  If the start times for different teachers are different, then all slots are displayed correctly.

I haven't looked at the code enough to see how to deal with this.  Please feel free to take a swing at it.  I'm not sure what situation this code is trying to deal with, so I don't want to just comment it out.

bkg





In reply to Brian Gray

Re: Students cannot see Location of Meeting in scheduler

by Steve Power -

Brian

I see what you are doing but this is way beyond my expertise at present.

As you said a while ago it seems strange that the code works if this many changes are required.

Regards
Steve

In reply to Steve Power

Re: Students cannot see Location of Meeting in scheduler

by Felix Zimmerbeutel -
Hi!

I completed the view.php with all the code you posted, but when I try to create a range of slots, I still get the message: "0 slots have been added".

I am currently using:
Moodle 1.6 (2006050506)
PostgreSQL 7.4.7
PHP 4.3.10.16

Maybe anyone has an idea for me.

Yours
Felix
In reply to Felix Zimmerbeutel

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -
There could be many possibilities for why it's not working for you.

If you want to email your view.php file to me, I'll put it on my test system and see if I can spot anything.

I'll be out of town Aug  1 - 8.

bkg
In reply to Brian Gray

Re: Students cannot see Location of Meeting in scheduler

by Bhupinder Singh -

Brian,

 

I have installed Schedular Activity .

I cannot add multiple slots. I get msessage no slots created.

On seeign at the creation of multi-le slots I get the error.

" Warning: getdate(): Cannot perform date calculation in e:\program files\easyphp\www\lms\lib\moodlelib.php on line 976".

I am new to this module hence request help in advising what should be done. Attaching a screen shot of what I get on going to schedular.

 

Thanks for the help.

Garry


 

 

 

In reply to Felix Zimmerbeutel

Re: Students cannot see Location of Meeting in scheduler

by Jarmo Tanskanen -
Hi

I had same configuration (except php5) and same problem.  And I did not see my appointments or any appointments at all.

Reasons for this:
  • There are two missing columns in table mdl_scheduler_slots
  • There is one sql-statement to be repaired
Fixes, (you can do this at your own risk):
Add columns teacher and  appoinmentlocation to the table  mdl_scheduler_slots.
For example:
% alter table mdl_scheduler_slots add column teacher bigint;
% alter table mdl_scheduler_slots alter column teacher set default 0;
If you have already entries in table you should change teacher values to zero. I am not sure about this. But I did it.
and
% alter table mdl_scheduler_slots add column appointmentlocation text;

And edit line in .../moodle/scheduler/view.php (line 849), it should be:
$sql = "SELECT * FROM ". $CFG->prefix . "scheduler_slots WHERE $select ORDER BY starttime ASC, student ASC LIMIT 25  OFFSET ".($start*25);
which is understood by postgres7.

This is very quick fix and not tested widely. But works for me.

Note:
When you add appointments be sure that duration is shorter than $endtime-$starttime

Thanks to Ari for finnish language file.

- Jarmo


In reply to Jarmo Tanskanen

Re: Students cannot see Location of Meeting in scheduler

by Brian Gray -

I have attached the view.php file as I am running it now.  My changes were made to the version posted above on July 2, 2006.  If you have not yet done so, you should install that version of the module first, visit the Admin page to update the database schema, and then copy my version of view.php in.

Usual warnings apply - test server only - may not work for you - void where prohibited.

bkg

In reply to Gustav W Delius

What/Where is the latest scheduler module?

by Howard Taylor -

Hi All,

Where should I get the most up to date version of this module?

I see the patches and modifications being posted as attachments in this thread.

Are they being incorporated into the 'standard' download from the Moodle Modules and Plugins Download area at :

http://download.moodle.org/download.php/modules/scheduler.zip

Regards,

Howard

In reply to Gustav W Delius

Re: Updated scheduler module

by W Page -

Hello All!

I see that Gustav began this thread but it is not clear who the module Maintainer is. thoughtful

Gustav are you the Maintainer?

WP1

In reply to Gustav W Delius

Re: Updated scheduler module

by Enrique Castro -
Picture of Core developers Picture of Particularly helpful Moodlers
Hi all,
We at ULPGC use a lot the module Scheduler. We consider it essential to manage the setting of tutorial meetings in our mixed presential/virtual environment. I have reviewed all the versions and modifications published in this thread and have almost completely rewritten the module to synthesize in a coherent code all the useful functions.

I have added functionality to support standard moodle groupmode, and manage groups to create new slots (teacher can set that only students that are member or a given group can book) and to appoint meetings (meetings can be established for a whole group at once). Now the module works either in exclusive (only one appointment per student) or non-exclusive (several slots can be booked). I have included a more detailed description in the README within the module.

In the way, I have seen easier to re-structure the code if the tables were re-structured also. Now there is an _slots to store only the attributes of a teacher-created time-slot (timing, teacher, type of slot) and a separate _books table to keep record of whom student has booked what slot. Due to this change I have renamed the module as Appointment, just to make possible to have both installed alongside and compare functions. Renaming it back to scheduler is a simple search&replace.

The module need a lot of testing, please let me know any bugs, errors, or problems in general that this code may expose. I am open for any suggestion to improve it.

Regards
Enrique
In reply to Enrique Castro

Re: Updated scheduler module

by Brian Gray -
Enrique -

Thank you for undertaking this revision & enhancement project.  I've done some quick testing, and found only one problem so far: If a student has added a comment to his appointment, the "comments" link on the faculty screen has an invalid link.  For example:
should be:

I will do some more testing after I create enough users to work on the group features and multiple booking features.

I really like the changes you've made.  It is a big improvement to an already-good tool.

bkg
In reply to Brian Gray

Re: Updated scheduler module

by Brian Gray -
A few more bugs related to groups:

When a group appointment is scheduled, the group name is displayed once for each student in the group.  I would expect either the group name once or names of all students in the group.

In Visible Group mode, if a student tries to schedule an appointment for a group that he is not a member of, the error message is not displayed correctly.  It appears that there is a problem with the get_string call in print_error, but I can't track it down.  THe text that is displayed is: "Sorry, you are not a member of that group".

Separate Groups mode does not work correctly if the student is a member of more than one group.  If the group that is selected is the first group the student is a member of, it works as expected.  If the selected group is other than the first one for the student si defined in, an error message ("You do not belong to this group!") is displayed in three places on the screen, and the student can not schedule an appointment.

In reply to Enrique Castro

Re: Updated scheduler module

by Brian Gray -
When the teacher turns student view on and goes to an Appointment activity, both the teacher view and student view are displayed on the page.
In reply to Brian Gray

Re: Updated scheduler module

by Enrique Castro -
Picture of Core developers Picture of Particularly helpful Moodlers
OK, thanks Brian for dedicating some time to test thsi module. I think I have addresed all bugs I have been able to reproduce:  shownotes link, group name written several times, the get_string problem with Sorry, you are not a member of that group, and the student view problem. I am attaching a version with these bugs fixed.

However, I cannot reproduce the problem with separate groups. I have tested with a user as member of 4 groups  and he can book a different slot acting as group 1 - 4. In any order. Please, let me know more about the specific scenario that triggers the error. On the other hand, I do not recognize the message  "You do not belong to this group!", this is not in any of the lang strings in my moodle 1.6.1+ installation. Is it perhaps a customized version of $string['notingroup'] = 'Sorry, but you need to be part of a group to see this activity.'; ?

One thing that is positively broken is backup, I'm trying to learn more about backup/restore functions to address this essential point for final release.

Enrique
In reply to Enrique Castro

Re: Updated scheduler module

by Brian Gray -
Enrique -

After I installed your bug fixes, all of the problems went away - including the on related to groups that you could not reproduce.  Apparently, it was a side-effect of something else that you changed.

One minor error crept into the second version - in the en_utf8 language file, the 'modulename' string value (Appointment) should be capitalized so that it appears in the drop-down list of activities correctly.

I can produce the error message (screen shot attached), but now I get it only when I expect to get it - when the user is in fact not a member of the currently selected group.  Here's how to see it work correctly...

1) There are at least three groups in the course - two that the student is a member of and one that the student is not a member of.

2) The Appointment object is created in Visible groups mode.

3) Student opens the Appointment object, and views the group that he is NOT a member of.

4) Student selects an available time slot and submits it.

5) Error message appears as expected.

I don't know where the message is coming from, but I really did see it.

I'll be testing some of the group features and email/reminder features late this week when I have students in my class.

Based o some of my testing, it appears that when a group schedules a time slot, the database gets an entry for each member of the group as opposed to a single entry for the group.  Is that what happens?  (I'm just curious...the only problem with adding an entry for each member of the group is that if a student is added to the group after the slot is reserved, that new member would not get an email reminder.  Such is life...)

I like these changes more and more as I work with the module.

bkg
Attachment error_msg.jpg
In reply to Brian Gray

Re: Updated scheduler module

by Chardelle Busch -
Picture of Core developers
Hi Enrique,

Thanks so much for taking the time with this mod--it is a handy tool I use for scheduling chat times.

I downloaded your version and took a quick look (I haven't tried the latest fixes yet), but one thing I noticed was the problems with the comments--did that get fixed?  Also, I noticed that text with apostrophes came back with slashes.  I haven't looked at the code, but offhand I would say maybe you need to add  'addslashes'  or 'stripslashes' or something lke that to the text entry?
In reply to Enrique Castro

Re: Appointment module (was: Updated scheduler module)

by Brian Gray -
Email reminders for appointments arrive as expected (at least when set to arrive on the morning of the appointment), but the text isn't quite right.  The 'meetingwith' string fails, even though there is a value defined in the en_utf8 version of the string file.


Subject: meetingwith Brian Gray

Text:
This is an automatic reminder for an scheduled appointment.
                        meetingwith Brian Gray.
                        Date: Friday 25th August 2006,   10:20 - 10:20.
                        Location: Nowhere.

In reply to Brian Gray

Re: Appointment module (was: Updated scheduler module)

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators
Hi all,

It's difficult to kwown witch file is the good one now.
It's seems to be Appointment V2.
I test it and have some troubles. I don't know if there are only for me, but here they are :
  • translation problem (due to programe, not translation file) :
    • appointment types for "add only 1 slot" are not translated
    • th lines from the statistics tables aren't translated
    • subject and message for "Reminder" and "Invitation" mailing aren't translated
  • calendar
    • student view : when you change a appointment slot, new one is created but the last stay here (it must be deleted)
    • teacher view : appointments title are correctly viewed in the little calendar, but there is nothing in the detailed calendar, only something empty with a wrong time
  • other
    • in the "Reminder" and "Invitation" mails, I think we can change <br /> by appropriate syntaxe for text form
Thank for your work !
Eric

In reply to Éric Bugnet

scheduler and calendar for teachers

by Michael Schwab -
I am not experienced at all with PHP (or moodle, for that matter) but found that the error on the teacher's calendar seems to come from a couple of missing lines in lib.php which don't populate the instance-field in the event-table.

Adding

$teacherEvent->instance = $slot->scheduler;

below line 290 in both the update and the insert block will add the instance number (which is the primary key of the scheduler-table) also for teachers and the event will appear on the teacher's calendar.

Is this correct or am I overlooking something? Is there a reason why the instance is not supplied for teachers?

One reason might be this: Now that I can see the event for the teacher, if I try to edit or delete the individual booking in the calender I am actually editing or deleting that instance of the scheduler, which is of course very dangerous.

In any case, would be great if somebody could confirm or not if that is rubbish - or not wink

Michael

btw the same thing is true in the appointments object
In reply to Enrique Castro

Re: Updated scheduler module

by Alain Lasserre -
Hi Enrique,

thanks for your very nice Appointment V2 Tool.

I have installed it on moodle 1.63 and it work fine.

I have some little question:

 1. what about a germany language file ?
 2. when i use "add single slot" there is no field for "max. students" ?

any idea ?

best regards from Berlin/Germany
Alain Lasserre
In reply to Gustav W Delius

Re: Updated scheduler module

by Michael McDermott -

This is my attempt at putting all updates together. I have also added to the language pack. All works well for me in Moodle 1.6 (Though I bet there are bugs in there), except appointments for the person who is not currently logged in. It defaults to me, even when I try to add another teacher.

 

In reply to Michael McDermott

Re: Updated scheduler module

by Dorie Minich -
We just upgraded to 1.6.2 using the scheduler from 1.5.  I've downloaded the scheduler.zip file but I don't think I'm loading it in 1.6 correctly.  Do I need to delete the old version of scheduler then move this copy over?  Simply how do I load the updated version of scheduler?
In reply to Michael McDermott

Re: Updated scheduler module

by Christopher Fasano -
Thank you for all of the work that you have all done on this. It's really very nice and tremendously useful.

I downloaded and successfully installed this module, after uninstalling an earlier version. I still can't seem to get "Add slots" to work correctly--no slots get added upon save--and I can't seem to allow multiple students in a slot. I'm running 1.6.1 with mysql. Is this a problem with my install or is it broken.

I do some php programming, so I'll take a look too...

Thanks Again
CF
In reply to Michael McDermott

Re: Updated scheduler module

by Steve Power -

Michael

I am confused. Is your collection of updates more recent than the Appointnment V2 that Eric mentions?

Appointment seems to include support for groups which unless I am missing something your collection does not.

We need the support for groups here and this is not in the version of Scheduler I have been trying out for some time.

Regards
Steve

In reply to Steve Power

Re: Updated scheduler module

by Michael McDermott -

Steve,

I think it is more recent than appointment V2, but not completely sure. When you say groups, do you mean group appointments that link to the groups in courses?

Mike

 

In reply to Michael McDermott

Re: Updated scheduler module

by Steve Power -

Mike

Thanks for your reply.

In Appointment groups refer to groups in the course. They can be used to filter the list of students who have made or need to make an appointment. There does not seem to be any link between course groups and a group appointment as far as I can see.

I have only tried things out with visible groups so far as that is what we use here but it seems possible for a student in group 2 to make an appointment in a slot created for group 1. I am slightly confused about how things should work but at least the groups allow filtering of lists of students.

Regards
Steve

In reply to Gustav W Delius

Re: Updated scheduler module

by mandy honeyman -
Trying to find answers to problems (without just posting a question) is very confusing here with the two threads:

this one about the scheduler module

and this one about the appointment module

from what I have understood so far, these appear to be two different modules, maintained by two different groups of people. However, there seems to be a lot of cross-purpose posting and trying to pick up a thread is horribly difficult.

Does anyone have a solution to this? My suggestion would be that the current maintainers, post something in their own thread indicating where the module is in terms of development, version number, link to cvs stable version and link to cvs development version (or something like that).

I post this only because I have now spent an hour trying to find a) an answer to a problem - unsuccessfully and b) trying to figure out what I have installed in comparison to the versions floating around. I can't be alone in getting confused, can I?

cheers
Mandy
In reply to Gustav W Delius

Re: Updated scheduler module

by mandy honeyman -
Hello,

I have a version of scheduler installed on v1.6.2 (version.php says: $module->version  = 2005100901;) but I only installed in from downloads about a month ago!

Anyway, the question is this:

I have added the resource to course # 1, this is the only course where all the teachers are available to all students, so it made sense to me to do this.

However, whenever a student tries to book an appointment scheduler comes back with
"Couldn't save choice to database"

This doesn't happen when I use the scheduler in a deeper course.

Can anyone please shed some light on this? It's a bit urgent because we were hoping to use it on Monday to enable students to book appointments with a whole bunch of teachers.

cheers
Mandy

In reply to mandy honeyman

Re: Updated scheduler module

by John Brine -
Statement:  Scheduler does not allow the creation of slots when installed with Moodle 1.6.2+  Therefore, it does not function as intended (in the most recent version of Moodle).

Question:  Is the above statement supported by anyone else's experience?  I don't want to allocate anymore time on "Scheduler", if this is the consensus.

Best regards.
In reply to John Brine

Re: Updated scheduler module

by Brian Gray -
That was my experience also.  There were several things in the Scheduler module that don't work as expected on 1.6.x. 

Instead, you should use the "Appointment" module.  File appointment2.zip is attached to a message earlier in this thread.  Works like Scheduler, but with many additional features.

In reply to Brian Gray

Re: Updated scheduler module

by Steve Power -

Brian

Thank you again. This is in line with my own findings and it seems to answer my earlier question to Michael.

Regards
Steve

In reply to Steve Power

Re: Updated scheduler module

by John Brine -
Thank you Brian and Steve for clarifying this. I will install Appointment 2.

Cheers.
In reply to John Brine

Re: Updated scheduler module

by Jonathan Smith -

I have installed Appointment2 on my system (Moodle 1.6) and everything works OK.

However I have noticed a couple of "bugs".

The scheduler is obviously linked in some way to the upcoming events block. Am I correct in thinking that I should be able to see a list of appoinments. All I see is blank lines. (See attachment)

Also if I go to calendar to see upcoming events I see empty entries.

Apart from this, the system seems to work perfectly. Is this a known problem? Is there a solution?

Any comments on whether appointment2 would work with Moodle 1.7. I would hate to lose it now if I upgrade.

Thank you

Attachment upcoming_events.JPG
In reply to Jonathan Smith

Re: Updated scheduler module

by Michael Schwab -
It looks like it is a similar problem to what I posted in the 'old' scheduler forum. Unfortunately, no one has replied, so I can't tell you any more details, although I would love a competent answer. I paste the old post below.

Cheers, Michael

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am not experienced at all with PHP (or moodle, for that matter) but found that the error on the teacher's calendar seems to come from a couple of missing lines in lib.php which don't populate the instance-field in the event-table.

Adding

$teacherEvent->instance = $slot->scheduler;

below line 290 in both the update and the insert block will add the instance number (which is the primary key of the scheduler-table) also for teachers and the event will appear on the teacher's calendar.

Is this correct or am I overlooking something? Is there a reason why the instance is not supplied for teachers?

One reason might be this: Now that I can see the event for the teacher, if I try to edit or delete the individual booking in the calender I am actually editing or deleting that instance of the scheduler, which is of course very dangerous.

In any case, would be great if somebody could confirm or not if that is rubbish - or not wink

Michael

btw the same thing is true in the appointments object
In reply to Michael Schwab

Re: Updated scheduler module

by Robin Trangmar -
Michael
Thank you for taking the trouble to re-post this, but can you explain to me where I can find the update and insert block please?
Should I add this code in lib.php in /blocks/calendar/ or elsewhere.
Thank you!

In reply to Robin Trangmar

Re: Updated scheduler module

by Michael Schwab -
Sorry, should have made this clearer -

the lib.php I meant is the one that ships either with scheduler or appointment and can be found in mod/appointment|scheduler/

You can search for this bit of code:

if ($studentEvent) {
$studentEvent->name = $studentEventName;
$studentEvent->description = $studentEventDescription;
$studentEvent->format = 1;
$studentEvent->userid = $eventStudent;
$studentEvent->modulename = 'appointment';
$studentEvent->instance = $slot->appointment;
$studentEvent->timestart = $eventStartTime;
$studentEvent->timeduration = $eventDuration;
$studentEvent->visible = 1;
$studentEvent->eventtype = $studentEventType;
update_record("event",$studentEvent);
} else {
$studentEvent->name = $studentEventName;
$studentEvent->description = $studentEventDescription;
$studentEvent->format = 1;
$studentEvent->userid = $eventStudent;
$studentEvent->modulename = 'appointment';
$studentEvent->instance = $slot->appointment;
$studentEvent->timestart = $eventStartTime;
$studentEvent->timeduration = $eventDuration;
$studentEvent->visible = 1;
$studentEvent->id = null;
$studentEvent->eventtype = $studentEventType;
// This should be changed to use add_event()
insert_record("event", $studentEvent);
}

if ($teacherEvent) {
$teacherEvent->name = $teacherEventName;
$teacherEvent->description = $teacherEventDescription;
$teacherEvent->format = 1;
$teacherEvent->userid = $slot->teacher;
$teacherEvent->modulename = 'appointment';
$teacherEvent->instance = $slot->appointment;
$teacherEvent->timestart = $eventStartTime;
$teacherEvent->timeduration = $eventDuration;
$teacherEvent->visible = 1;
$teacherEvent->eventtype = $teacherEventType;
update_record("event",$teacherEvent);
} else {
$teacherEvent->name = $teacherEventName;
$teacherEvent->description = $teacherEventDescription;
$teacherEvent->format = 1;
$teacherEvent->userid = $slot->teacher;
$teacherEvent->modulename = 'appointment';
$teacherEvent->instance = $slot->appointment;
$teacherEvent->timestart = $eventStartTime;
$teacherEvent->timeduration = $eventDuration;
$teacherEvent->visible = 1;
$teacherEvent->id = null;
$teacherEvent->eventtype = $teacherEventType;
insert_record("event", $teacherEvent);
}

You will see in your original code that in the first block (student) the instance is populated twice with: $slot->appointment for update and insert while these lines are missing in the second block (teacher).

I added these two lines (in the code above), which seems to work with the issue discussed in my previous post.

I would feel much more comfortable if one of the original developers could verify that this is a sensible thing to do - various people have posted problems with the calendar without any responses!

Alternatively, as I am fairly new to this, would another member of this forum please advice me on a better way to feedback to those maintaining the code?

Good luck!
In reply to Michael Schwab

Re: Updated scheduler module

by Robin Trangmar -
Thanks Michael - another problem solved
I picked up a tip from the Quickmail forum that seems to work as well.
When scheduler batches out the emails to students they get:
This is an automatic reminder for an scheduled appointment.
meetingwith Robin Trangmar.
Date of appointment: Monday 20th November 2006, 09:00
- 09:00.
Location: test.
If you copy the file ../scheduler/lang/en_utf8/scheduler.php
and place it in ../moodle/lang/en_utf8/
this replaces the message with
Scheduled Appointment with Robin Trangmar on Thursday 23rd November 2006 from 18:30 until 18:30.
I just need to solve the time span shown so that it shows the duration of the event (in my last example it should be 18:30 to 19:00)
In reply to Gustav W Delius

Re: Updated scheduler module

by Kenneth Newquist -
What is the current status of this module? Does it have a maintainer, and if so, are the changes mentioned in this thread finding their way back into module download on Moodle.org?

I ask because we're looking at using Scheduler as part of our upcoming Moodle beta test, but the version I downloaded still has the "can not add multiple slots" bug mentioned earlier in this thread.

I've re-opened a Tracker issue for this problem:

http://tracker.moodle.org/browse/MDL-7553

When I attempt to add multiple slots, the script throws a bunch of "Undefined variable" errors. I plan on taking a look at the code once I track down a few other, unrelated Moodle problems, but if this module isn't being actively maintained we may not use it in our test rollout.

Thanks for your help with this,

Ken


In reply to Kenneth Newquist

Re: Updated scheduler module

by Thomas Haynes -

Greetings...

I am also interested in the scheduler module. I installed it and am unable to create slots.

Are the changes above in this thread being rolled into current?

We would like to get this working, and would appreciate any help.

Regards...   Tom

  

In reply to Thomas Haynes

Re: Updated scheduler module

by Kenneth Newquist -
Joshua Mathianas has posted a fix for the pre-1.7 versions of Moodle; you can check it out by visiting the Tracker page for this issue:

http://tracker.moodle.org/browse/MDL-7553?page=all

He's looking to do a 1.7 fix at some point, but no ETA. I'd still like to hear from the maintainers so that these fixes can be roled into the main module.

Ken
In reply to Thomas Haynes

Re: Updated scheduler module

by mandy honeyman -

Hi, (what a relief to find this thread!)

I have exactly the same problem as Tom (did you ever find a solution to this- Tom?) we're running 1.6.2 scheduler v1.2 (at least the latest file I could find last  term).

The weird thing is that we have used it already on two different occassions (we're running "subject surgeries") in the same course and they worked perfectly, (we have changed server from unix to windows but nothing else!).

BTW Rooting around I have noticed that the scheduler tables are not utf8, so this is one of the - obvious - things that needs to be on the development list.

cheers

Mandy

In reply to Gustav W Delius

Re: Updated scheduler module

by Fernando Rosa -

Hi everyone. I've recently started to use the scheduler module and after some feedback from the forum it works great and saves lots of work.

However, I have a problem. I have created several courses, and I am a teacher of only a few of them. Is it possible to add appointments in different courses without having to manually check thay they don't overlap? I could always add it in the parent course, but since I'm not teacher of every course I would like to avoid that (at least, as long as the group feature of adding activities for a single group is not implemented).

Thanks!

In reply to Gustav W Delius

Re: Updated scheduler module

by Melissa Fernandez -
I'm attempting to install the scheduler module in 1.6.3 but get a blank page when i visit the admin page. I've made sure there are no spaces after the ?> and am out of ideas. Anyone faced this before with this module?
In reply to Gustav W Delius

Can't see scheduler as a student

by David Bratslavsky -
I just installed the scheduler on my moodle site. I set up the time slots as the admin and can see when logging in as admin. When logging in as a student, there is nothing there when clicking the scheduler. no time slots or anything. can anyone help me to make sure the scheduler comes up and allows students to schedule appointments.

thanks,

david
In reply to David Bratslavsky

Re: Can't see scheduler as a student

by Neena J.T. -
I have installed scheduler 2005100901on Moodle 1.7. I used the fix for add multiple slots and it is working. However on the site, the students cannot see the slots.
This is also posted at http://moodle.org/mod/data/view.php?d=13&rid=328
Thanks
Neena
In reply to Neena J.T.

Re: Can't see scheduler as a student

by Richard Cory -
I have the exact same issue. All fixes were applied and teacher sees all of the time slots. But students can not see the available dates to choose from. Running 1.7.1+

RC
In reply to Richard Cory

Re: Can't see scheduler as a student

by Neena J.T. -

Hi Richard,

The problem of the invisible slots for students in 1.7 was solved by setting the Display appointment to students from to x days before slot (minus the day the slot was set). The problem seems to be with the "Now" choice.

Hope this helps you.

Neena

In reply to Neena J.T.

Re: Can't see scheduler as a student

by Richard Cory -
thanks Neena ... it worked

RC
In reply to Richard Cory

How to make Scheduler run on 1.7?

by Michael Schwab -
Dear group,

Scheduler/appointment are great modules, but the way the development of these is working is VERY frustrating.

Would somebody who is running scheduler/appointment on 1.7 please post exactly what has to be done/fixed and also which of the various versions of the activity module they are using in the first place (as the version number seems never to change).

I do think that moodle has a certain responsibility towards these plug-in modules; we can't just sit and wait for somebody sometime to update the modules without any indication.

Sorry for this - promised everybody a booking system in 1.6, then moved to 1.7.

Michael
In reply to Michael Schwab

Re: How to make Scheduler run on 1.7?

by Kenneth Newquist -
I've spent the last few weeks working on getting Scheduler operational under 1.7. There are a few issues directly related to Roles under 1.7; others are bugs that I think have been in the code for a while (like the aforementioned start time/end time bug in the e-mail reminders).

I'll work on posting a summary of my changes, as well as the specific code tweaks, later this week.
In reply to Kenneth Newquist

Re: How to make Scheduler run on 1.7?

by Michael Schwab -
Dear Kenneth,

this is great news - I was hoping that somebody out there took on the challenge of getting scheduler to work in 1.7! Thank you very much! I am looking forward to your post.

Michael
In reply to Michael Schwab

Re: How to make Scheduler run on 1.7?

by Michael Schwab -
Dear Kenneth (et al),

I am still hoping to get a solution for scheduler/appointment on 1.7. Any news on progress?

Cheers, Michael
In reply to Kenneth Newquist

Re: How to make Scheduler run on 1.7?

by Matthew West -
Kenneth,

Thank you very much for working the development of Scheduler in 1.7... There seems to be a need for it!

Here's my 2¢:

Running 1.7.1+, Solaris 10, Apache 2, PHP 5.2, MySQL 5, Schedule module updated with the last patch.

Everything seems to work, but when a student tries to schedule an appointment we see: "Couldn't save choice to database."

Is the development you are doing addressing the code causing this issue? We're trying to decide whether or not to modify code or wait for this module to be further developed...

Again Kenneth, thanks again for working on this!

Take Care,

Matthew


In reply to Matthew West

Scheduler on 1.7 or 1.8?

by Jon Loose -
Does anyone know if scheduler is likely to work better on 1.8 than 1.7? I am planning to use this module quite extensively in a new installation, and at present I wonder if I'm better to go back to 1.6, hang on for a 1.7 fix, or pursue 1.8. Any informed thoughts would be gratefully received!

Jon
In reply to Kenneth Newquist

Re: How to make Scheduler run on 1.7?

by Markus Knierim -
Hi all,

based on Enrique Castro's http://moodle.org/file.php/5/moddata/forum/27/237963/appointment2.zip I tried to fix the most critical issues so that the module is quite usable under 1.6.3 and 1.7 (without roles support, though). There are still a couple of bugs floating around; if you come across any, please post them here.

Kenneth: Have you made any progress on implementing roles?

Cheers,
Markus
In reply to Markus Knierim

Re: How to make Scheduler run on 1.7?

by Dorie Minich -
Please Help

I've just spent the last hour trying to get both the appointment and scheduler module working in 1.7+. I have no problem adding multiple slots to either activity however the student cannot view them.

Please advise.
Dorie Minich
In reply to Markus Knierim

Re: How to make Scheduler run on 1.7?

by Michael Schwab -
Dear Markus,

thank you very much for this - I will test as soon as I can. Can I ask you, as you seem to be working on it, what is your take on the maintenance of the scheduler/appointment module?

In 1.6 we first used scheduler, then appointment, then upgraded to 1.7 and couldn't use any. Kenneth seems to be working on a 1.7 implementation of scheduler while you did the same for appointment. It looks to me as if there is no reason why scheduler is used anymore (or am I wrong), on the other hand it looked like appointment had virtually no developer base (apart from you now)? Do you feel that there will be something to rely on, and if yes what is your take?

Thank you very much for the post and the time you spend on it. I am sure that many people will appreciate this. I most certainly do.

Michael
In reply to Gustav W Delius

Re: Updated scheduler module

by Dan Clarke -
At Gloscat we had a problem where the slots view had two pages, but you could only view the second page. The quick and dirty fix is to put the following line:

$start = optional_param('start');

Directly above:

if (($start == "") & ($sqlcount > 25)){
$startcount = count_records_select("scheduler_slots",$select." AND starttime < '".strtotime("now")."'");
$start = floor($startcount/25);
}


In reply to Dan Clarke

What happened to the source file?

by Jez H -
I came to download the latest copy of the source and it is missing, does anyone know what is going on with this, has it been removed deliberately?
In reply to Jez H

Re: What happened to the source file?

by Kenneth Newquist -
(APOLOGIES IN ADVANCE: I also posted this information under the discussion thread for "Scheduler" module, but since I posted here earlier, I wanted to make sure folks received my update.

I have updated Scheduler to work with Moodle 1.7.2 and higher (my version is working in Moodle 1.8.2) and I'd be happy to share the revised code with others to test on their sites. Please send me a message with your e-mail address (you can use Moodle.org's built in messaging), and I'll send you my hacked version of Scheduler.

As was alluded to elsewhere in this thread, the version of Scheduler (2005100901) currently available for download from Moodle.org (as of 7/31/07) was written for versions prior to Moodle 1.6. With Moodle 1.7.2, Roles fundamentally changed, and the old table used to store teacher/student information was removed. This causes several of the queries that Scheduler uses to fail, because it's looking at the wrong tables.

In addition, there are a number bugs other bugs in the code that prevent portions of Scheduler from working as intended.

I've documented the changes I made to Scheduler in order to get it working at Lafayette College. It revises the code so that it knows where to look the traditional "teacher" and "student" role information. That said, this version of Moodle is not smart enough to recognize the post-1.7 Roles system, which relies on "hascapability" and other such flags set at the admin level to determine which roles get access to which capabilities within Moodle. My queries work, but the entire module really needs to be updated to integrate properly with the new Roles system.

I'm not the maintainer for Scheduler but I would like to collaborate with other Moodle programmers/users to bring my hacks and the rest of the module into line with the current Moodle code base. While this code works for us, I think that it needs more testing -- and more permanent revisions to the way it handles Roles -- before it's ready for primetime.

If you are interested in working with me on this project, or have any questions about my changes, please contact me.

Ken Newquist
Lafayette College
In reply to Kenneth Newquist

Quicktest Scheduler 1,82

by Bent Laursen -

OS: OpenSuse 10.2
MySql: 5.0.26
PHP 5.2.0
Apache: 2.2.3.20
Moodle: 1.82+ (2007021520)

Hi Ken

Thank you for mailing your scheduler hack for Moodle 1.82.

No problems installing and running on the system above – but the mode dropdown only has one option (Students can only register one appointment) .

So thank you, Ken – there are few modules that are really essential for productivity – scheduler is one (Quiz Detailed Reports another).

Unfortunately I cannot contribute to the maintenance of modules (my programming experience is windows, asp, DotNet based, but if there is any way I can support people who can and will, I’m ready!

I wonder too, if it is possible to design a module programming interface to Moodle so the 3rd party modules don’t need to be updated with new versions of moodle. This is also an effort I would want to support.

But thanks again, Ken.

Kind regards

Bent Laursen

In reply to Kenneth Newquist

Re: What happened to the source file?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Ken - Let me know what you need to get this back into active development. I think this module shows some really good potential and there seems to be sufficient interest in pushing it forward. Peace - Anthony
In reply to Anthony Borrow

Re: What happened to the source file?

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Valery Fremaux has updated this very recently to work with 1.8.x and 1.9beta. If you can read french, go to the french developer forum, here: http://moodle.org/mod/forum/discuss.php?d=84460 and test his last version.

Cheers!
In reply to Nicolas Martignoni

Re: What happened to the source file?

by Michael Schwab -
Hi,

we are using 1.8.1 and I have just installed the French prerelease 3 (2007110209), which already produced an error msg (parsing of code) as I was trying to create a slot.

I am not reading French and seem to be unable to find which versions of Moodle are supported etc. Has anybody installed this scheduler and run it successfully?

Thanks,

Michael
In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

Could you tell me more about this trailing bug ? It should be fixed up in a couple of seconds.... wink.

Tell me about exact context. I developped this new version using 1.8.2. Maybe some previous versions of Moodle need a few fixes to ensure backward compatibility, at least up to 1.7.x

Thanks.

In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

Prerelease 4 just published that fixes a few bugs of incompatibility php5/php4 and other minor errors.

I tested it a bit on 1.7.1. slots are created as required... 

In reply to Valery Fremaux

Re: What happened to the source file?

by Michael Schwab -
Dear Valery,

thank you very much for the quick response. We installed prerelease 4 and still have the same error:

Parse error: parse error, unexpected $end in D:\xampplite\moodle\mod\scheduler\addslotsform.html on line 193

Moodle 1.8.1
MySQL 5.0.21
PHP 5.2.0

Any idea?

It is great news that you have started looking after the scheduler. It has been very difficult to use given the version changes moodle went through.

All the best,

Michael
In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -
Tell me about this code. I don't feel i've changed many in it, but it does actually work on the dev site.
In reply to Valery Fremaux

Re: What happened to the source file?

by Michael Schwab -
Dear Valery,

first of all: Thank you very much & sorry for my late reply.

I had somebody looking over the code and they found that at a couple of places in the add slots and add slot form code it said:

<? instead of <?php

Apparently, our server did not understand the implicit declaration of the php bit. It is probably a good idea to add this to all of the module?

It works really well now!

Btw one thing I realized is that the calendar is not integrated as it used to be - this is not an issue for us, but what are your thoughts - will you do this or will you leave this out?

All the best,

Michael
In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

I may have not revised ALL parts of the old code. That is why there can be some things left like <?  !! I try to get the code as Moodle as possible, anyway.

I did not change the original way messages were send to the calendar. I agree this is a "local" way of doing it. I confess I did not really spend time on this point as it seemed to work "as is". Could you tell me what is the real point that makes it odd ?

Thanks.

PS. Next reviewed module will be Tracker. (Integrated tracker in Moodle). 

In reply to Valery Fremaux

Re: What happened to the source file?

by Chad Outten -
fantastic work, Valery! this module is exactly what i was looking for. ive done a bit of initial testing on moodle 1.9b2+ mysql 5.0.41 php 5.2.3

installation went fine. no prob adding schedule & appointments for teachers, students. however, i constantly encountered this error when i scheduled an appointment...

template /Applications/MAMP/htdocs/moodle19/mod/scheduler/mails/de_utf8/cancelled.tpl not found

any ideas?

Cheers, Chad


In reply to Chad Outten

Re: What happened to the source file?

by Valery Fremaux -

Yes Chad, of course !!

When scheduling and having activated the notifications by mail, you may have to send a mail to your students. The mail is produced using an ancient technique I used in many projects of mine, which injects data within a template.

Obviously, you will surely have translmated the lang/...  subdir, wich will be of a great interest for me to add to the distribution wink , but you will also want these templates being translated in german, so that mails will be fired in your language.

What you need is very simple :

clone the mails/en_utf8 dir to mails/de_utf8 with all its content, open every .tpl mail template and translate or rewrite exactly the message you want in. And you'll have german notifications !!

Enjoy.

In reply to Valery Fremaux

Re: Updated scheduler module

by Chad Outten -
Hey Valery. yeah, that makes total sense. I deactivated the mail notification & the error disappeared!

fyi - i had copied the lang files from the original scheduler download to the lang/en_utf8 dir so im not sure why i was getting a de_utf8 error?! is there a line of code somewhere that needs to be modified to ensure the cancelled.tpl is executed from the appropriate mails/lang dir?

i do speak some german, but i honestly think the translation is better suited to a native speaker! wink

Cheers, Chad
In reply to Valery Fremaux

Re: What happened to the source file?

by Michael Schwab -
Dear Valery,

just a question about two minor issues I encountered:

1. when creating slots that collide with other existing slots we do get some SQL debug code (I am assuming). This may be a problem when moving to production server. Are you planning to change the message so people are not confused?

2. when adding multiple slots the option 'forcing slots' has no label - again, difficult for non technical members of staff. The help file is there, however.

When are you planning to post the final release?

Thank you very much for all the work you have put into this!

Michael


In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

Hi Michael

I just acheived completing the developing working environment adding a dedicated bugtracker (Moodle of course (!!), end-user oriented) for Scheduler Issues. Feel free using it to report in english issues such as you mentionned in the forum.

There is no real plan for a "release" version as we worked with a french team to make a "major debug action". There may be reliquates, even in a "release". I do not have master policy on when I could qualify a version as released. Mostly would it be when actual feature level do not present any noticeable bugs. That should be acheived when enough reporting will have been done.

My policy is "be always urgently reactive when you know where to look for". Suscribing to that development space will you be immediately informed when a new release is available and which issues it will fix. (both EN and FR communication, which costs me twice !!)

Scheduler Support Bugtracker : http://www.ethnoinformatique.fr/mod/tracker/view.php?id=2364&view=reportanissue&lang=en_utf8

Cheers.

I'll post these and have a look.

In reply to Valery Fremaux

Multiple Students with Multiple Appointments?

by Marty Gilbert -
Picture of Core developers
Sorry to cross post this; accidentally put it on the Scheduler Module Info page.

I'd like to second the vote for allowing someone to book more than one appointment at a time, so I can use it as a meeting negotiation tool. I wish I had the time to check it out myself, because all of our faculty committees are on moodle and would benefit greatly from this added functionality.

Any work being done on this feature currently?

--Marty
In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

Error 2 : This is an idiot miss of my own :

in lang/en_utf8/scheduler.php § 58 : add the label string "Force when overlap" in the value for the key "forcewhenoverlap"

Fixed in the next published released.

Error 1 : I try to produce issue...

In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

1. Not able to reproduce it. I have indexed a first release in http://www.ethnoinformatique.fr/course/view.php?id=122. Tell me if it fixes these printings.

Thanks.

In reply to Valery Fremaux

Re: What happened to the source file?

by Michael Schwab -
Dear Valery,

the error regarding the strange sql messages when creating overlapping slots seems to be fixed in release 1.

However, we had to re-fix the above mentioned php code:

quote:

<? instead of <?php

Apparently, our server did not understand the implicit declaration of the php bit. It is probably a good idea to add this to all of the module?

/quote

It would be great if you could integrate this into the release so we need not think about it anymore.

Thank you very much!

Michael
In reply to Michael Schwab

Re: What happened to the source file?

by Valery Fremaux -

Should NEVER had happened !!

I check it again...

Thanks.

In reply to Valery Fremaux

Vastus: Re: What happened to the source file?

by Taavi Möller -
I tryed both release 1 and 3 and I get an page with empty content area if I push either Add slots or Add single slot buttons. There was no errors reported when database tables were created. Don't know what do look or test next as I am newbie in Moodle.
In reply to Taavi Möller

Re: Vastus: Re: What happened to the source file?

by Michael Gerth -

We have exact the same problem: Installation seems to be correct, other functions work fine. And (!): time-tables are filled with slots (I can export the tables), but nobody can see the tables (no teachers, no students).

We are using Moodle 1.8.4 and the latest scheduler version (at least with release 5, fine german translation, by the way) on a linux box with postgres as db.

In reply to Michael Gerth

Re: Vastus: Re: What happened to the source file?

by Kent Villard -
Has anyone tried this module on 1.9+
In reply to Kent Villard

Re: Vastus: Re: What happened to the source file?

by Paul Fynn -

Sorry, I'm late into this discussion (and moodle, come to that). I'm on 1.9.4? should I be able to access the scheduler module, or is this an optional extra?
Thanks Paul

In reply to Paul Fynn

Re: Vastus: Re: What happened to the source file?

by llywelyn morgan -

Grear module.  Trialling it now for a forthcoming parents' evening.

would it be possible to add an extra feature in future updates?  

some parents have asked if a student could see a list of all the appointments they have made.

thanks for the great work.

In reply to Gustav W Delius

Re: Updated scheduler module

by Damon Blanchette -

Hello!!  So I'll be the first in over three years (besides Llywelyn) to post on this thread!

This scheduler module is great, and it does what we want it to do, which is to allow faculty to put up office hours and for students to sign up.  However, we can't use it.  The problem is that the this module only works *per course*, and we need it to work *per professor*.  We are running Moodle 2.3.1.

How difficult would it be to alter this mod to work outside of a specific course, and be connected to a specific professor?  Is that option in the pipeline for the future?  Thanks for any help!

In reply to Damon Blanchette

Re: Updated scheduler module

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

Scheduler is a Moodle "activity module" (like Assignment, Quiz, Workshop, etc.) and is therefore always tied to a course. There's not much to be changed about that, at least I'm not planning to; it's the basic structure in which Moodle works.

What you can do is to create a scheduler on the Moodle front page, which would then be available to all users. Or you can create one course for each professor, where he communicates with his students/supervisees and can in particular add a scheduler. (This might seem quite complicated at first, but we do indeed run this model on our own site!)

In reply to Damon Blanchette

Re: Updated scheduler module

by Mark Pearson -

I figured a workaround so that  a prof can have a single scheduler for all her courses.

Basically, after creating a suitable Category in which to hold the moodle sites, you create a 'meta' course and add to it all the child courses that the Prof teaches. Then you merely add the scheduler activity into this course. Obviously the courses will have to be changed each semester / term but that's just a matter of adding and removing the appropriate child courses. There's no way I know of to automate this so while it would work for one or two teachers to do this manually it wouldn't scale to a whole insitution. In the latter case you'd want to hire a Moodle expert programmer  to automate the process.

Average of ratings: Useful (1)
In reply to Damon Blanchette

Re: Updated scheduler module

by Steve Taylor -

We do a variation of the above ideas. We've created a single course, into which we van enroll any instructor wishing to set up a schedule. (We may in the future just enroll all instructors.) They create a schedule there, copy the URL, and use it to create a web resource in each of their courses. Students not in any of the instructor's courses-- such as advisees-- could also go straight to the shared course site to schedule an appointment.

In reply to Gustav W Delius

Google Calendar Appointment Slots Going Away

by Steve Taylor -

Last summer, we upgraded from Moodle 1.9 and walked away from the Scheduler module, instead recommending that faculty use the "appointment slots" function of Google calendar for setting up office hours. it was perfect, but now- with 3 weeks notice!-- Google has announced that it's terminating the feature. So I guess we'll see how the latest Scheduler works with Moodle 2.4.