Using backup and restore to duplicate courses... any way to update due dates automatically?

Using backup and restore to duplicate courses... any way to update due dates automatically?

by Matt S -
Number of replies: 2

I'm using moodle 1.2. I use the backup and restore functions to make duplicate copies of courses. I have a master copy of each course in a master database. When I want to run a course, I run a backup of the course from the master database and restore it to the database where I actually want it to run. The courses all run in the weekly format. The problem is that when I perform the restore, all of the exam due dates are set to whatever they are set to in the master. I literally need to go through every single exam to update all of the due dates. Does anyone have any way to automatically update the due dates to match the dates assigned to the course in the Course Settings dialog box? Thanks!

matts

Average of ratings: -
In reply to Matt S

Re: Using backup and restore to duplicate courses... any way to update due dates automatically?

by Timothy Takemoto -

Dear Matt S

I am afraid that there is not a way of having quiz ("exam") dates set to match the dates in the course settings.

I agree that this feature would be very, very useful.

If it were possible to have a "set date relative to course week date" clickbox in side the setup of activities then when we change the course start date the deadlines of everything would be changed accordingly. However, I have been informed that the programming required to do this would be quite complex, and that it really should be integrated with the (long awaited) activities linking. Activities linking refers to the ability to set all activities to start and stop relative to events, both temporal (a certain date) and student actions (a certain mark in a test). So this means that the functionality would cost about $15,000 (USD) apparently. There is a outside chance that my institution will pay that amount of money but it does not seem very likely.

Alternatively it would be nice to have a big time-management-page, for both courses and GROUPS (see later) so that all start and stop times could be managed on one page, with a ripple through effect the course start date is changed. I have not asked for a quote for this feature yet.

In the meantime:

1) Bernard's super calendar which can do all you require and more perhaps.
http://moodle.org/mod/forum/discuss.php?d=16146

2) My institution has just commissioned a upgrade to the groups functionality to arrive in 1.5 so that enrollment keys will automatically enrol studets in groups. This will mean that classes that are held on the same day can be managed as one course with multiple groups. The only disadvantages I can see at the moment is that teachers will see all the grades with may create privacy issues. But this does not enable us to manage courses that start on different days. For that we would need group based deadlines.

3) The judiscious use of SQL commands to change deadlines. It is possible to change all deadlines forward or backward by a set amount of time using SQL commands, injected using the Mysql Admin plugin. Please below to for an explanation of how this is done.
http://moodle.org/mod/forum/discuss.php?d=11780&parent=57349
http://moodle.org/mod/forum/discuss.php?d=13856&parent=66647

Tim
tkmt


In reply to Matt S

Re: Using backup and restore to duplicate courses... any way to update due dates automatically?

by Dan Eliot -

I tried to use the Course Date Manager Block unsuccessfully, so I ended up doing it via MySQL.  Here's what I did:

Given that 1 day is 86400 seconds...

I needed to update all of my assignments and quizzes for this school year from last school year.  That was a 364 day change in my case (school started Sept. 7th 2004... this year it started Sept. 6th 2004).

I used PhpMyAdmin to enter the following SQL commands.  This was across the board for ALL of my courses, you may have to adapt this command if you only want to fix one course (see link below):

(1)  For assignments, I did the following (364 days forward):
a) backup database
b) UPDATE moodle_assignment SET timedue=timedue+31449600

(2)  For quizes, I needed to tweak both the start time (timeopen) and end time (timeclose) for every quiz (364 days forward):
a) backup database
b) UPDATE moodle_quiz SET timeclose=timeclose+31449600
c) UPDATE moodle_quiz SET timeopen=timeopen+31449600

This is not a magic fix... the admin may still have to tweak a date here and there.  But at least dates will match up correctly at the start of a new school year before any changes in curriculum and assignments are factored in.

This post adapted from info contained here:
http://moodle.org/mod/forum/discuss.php?d=13856&parent=66647