Issue Details (XML | Word | Printable)

Key: MDL-9367
Type: Sub-task Sub-task
Status: Open Open
Priority: Major Major
Assignee: Petr Skoda
Reporter: Ray Lawrence
Votes: 5
Watchers: 11
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-13847

Roll forward changes dates for user data

Created: 16/Apr/07 12:13 AM   Updated: 25/Apr/09 01:25 AM
Return to search
Issue 25 of 38 issue(s)
<< Previous | MDL-9367 | Next >>
Component/s: Backup
Affects Version/s: 1.8, 1.9
Fix Version/s: 2.0

Environment: xp apache 2 php 5.1.1 mysql 5.0.18

Database: MySQL
Participants: Clark Shah-Nelson, Eloy Lafuente (stronk7), Mary Parke, Petr Skoda, Ray Lawrence and Tim Hunt
Security Level: None
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
To reproduce:

Find course with forum posts - note post date/times
Back up that course with forum and user data
Restore to create new course, changing course start date along the way
View discussion with date/time of posts recorded (earlier)
Date/time of posts changed relative to the new course start date

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Ray Lawrence added a comment - 16/Apr/07 03:52 AM
This appears to be post info only. Ratings dates are unaffected.

Eloy Lafuente (stronk7) added a comment - 16/Dec/07 08:41 AM
Well,

after a quick look I've found this dates being rolled (against /mod )

assignment/restorelib.php: if ($restore->course_startdateoffset) {
chat/restorelib.php: if ($restore->course_startdateoffset) {
choice/restorelib.php: if ($restore->course_startdateoffset) {
data/restorelib.php: if ($restore->course_startdateoffset) {
dimdim/restorelib.php: if ($restore->course_startdateoffset) {
exercise/restorelib.php: if ($restore->course_startdateoffset) {
exercise/restorelib.php: $exercise->deadline += $restore->course_startdateoffset;
forum/restorelib.php: if ($restore->course_startdateoffset) {
forum/restorelib.php: $discussion->timemodified += $restore->course_startdateoffset;
forum/restorelib.php: $discussion->timestart += $restore->course_startdateoffset;
forum/restorelib.php: $discussion->timeend += $restore->course_startdateoffset;
forum/restorelib.php: $post->created += $restore->course_startdateoffset;
forum/restorelib.php: $post->modified += $restore->course_startdateoffset;
glossary/restorelib.php: if ($restore->course_startdateoffset) {
hotpot/restorelib.php: if ($restore->course_startdateoffset) {
journal/restorelib.php: if ($restore->course_startdateoffset) {
journal/restorelib.php: $entry->modified += $restore->course_startdateoffset;
journal/restorelib.php: $entry->timemarked += $restore->course_startdateoffset;
lesson/restorelib.php: if ($restore->course_startdateoffset) {
quiz/restorelib.php: if ($restore->course_startdateoffset) {
quiz/restorelibpre15.php: if ($restore->course_startdateoffset) {
wiki/restorelib.php: if ($restore->course_startdateoffset) {
wiki/restorelib.php: $entry->timemodified += $restore->course_startdateoffset;
wiki/restorelib.php: $page->created += $restore->course_startdateoffset;
wiki/restorelib.php: $page->lastmodified += $restore->course_startdateoffset;
workshop/restorelib.php: if ($restore->course_startdateoffset) {
workshop/restorelib.php: $submission->timecreated += $restore->course_startdateoffset;

it seems that results are a bit heterogeneous. While I think all agree about rolling activity configuration dates, I'm not really sure if it's a good idea to roll user information (forum->post, journal->entry, wiki->page)... more if other modules (glossary, lesson, quiz...) only change activity date, but not related user info.

More yet if some modules, as reported by Ray, has the roll feature semi-implemented (for example, forums rolling posts but not ratings...).

So I think we need to follow one of these approaches:

1) Roll only activity configuration dates.
2) Roll all dates in the activity.

I really don't see the point to 2) so my vote (+1) goes to 1).

Ciao


Eloy Lafuente (stronk7) added a comment - 16/Dec/07 08:41 AM
Raising to critical to have this fixed and homogenised ASAP. Please comment.

Tim Hunt added a comment - 16/Dec/07 06:27 PM
If you are working on this, it would be good to move the user interface for the new date onto the following screen, where you type in the new course code.

I basically agree with 1), but

a) You may then end up with it appearing that a student did something when an activity was closed. Do we care?
a+) And if you did that, might it break some things like regrading of quizzes?
b) What if the only non-configuration data was something like some carefully selected entries in the glossary by the teacher, or some posts in the news forum, and the teacher wanted them to look like they were done around the time the course stared?

Perhaps when restoring into an existing course, you could have the option to use that course start date, rather than having to type it in yourself.


Eloy Lafuente (stronk7) added a comment - 16/Dec/07 08:14 PM
Well,

a, a+) That's CURRENT behaviour in glossaries, quizzes... (user dates aren't rolled).
b) That's CURRENT behaviour in forums (partially), wikis, workshops...

Oki, let's offer 3 approaches to discuss this:

1) Roll ONLY activity configuration dates.
2) Roll ALL dates in the activity (configuration + user dates)
3) Provide one new setting in restore with this values (None, Configuration Dates Only, All Dates) in order to select what wants to be rolled.

Ciao


Ray Lawrence added a comment - 17/Dec/07 12:36 AM
Tim has a good point with his glossary entry example. However, one might not want that behaviour for all glossaries (for example).

How about this...

Provide the current global roll course start date for scheduled activities i.e. configuration dates.
Providing an option along side the user data check boxes for the individual doing the restore to decide if they want to apply that date for that activity on restore.

Whilst typing it's struck me that the only possible date for any user data that's rolled forward can be the new start date of the course as other dates e.g forum posts, chat sessions would always be in the future (when compared to the new course start date). So the only user data that makes sense to roll forward is glossary and database entries - with the new date for all being the revised course start date. (The scheduled forum post option is unlikely to be useful as the teachers in the new course may be different to those in the backed up course)

It's occured to me that text page and web page resources have a last edited date too, so perhaps those dates should be rolled forward as above too.

Also a major omission in the restore to new course options is the ability to updated the course summary too. I agree with Tim that the full name, short name (and summary if added) make sense to be on the next screen if New course is selected (at least I think that's what Tim was advocating(.


Petr Skoda added a comment - 03/Jul/08 04:37 PM
after looking at the code, this does not seem to be a trivial change, sorry
lowering priority and moving target to 2.0 - I really hope we will solve many other problems there by rewriting the code a bit

Mary Parke added a comment - 06/Dec/08 02:28 AM
This is actually a bigger issue that is mission critical for us (we're on 1.9.3) and should be addressed ASAP as it affects semester to semester rollover processes for institutions where faculty are a part of this process by necessity (we don't have staffing devoted to doing this for all of our courses, so placing it in the hands of our faculty is our only solution). However, as this process doesn't even currently work for systems administrators, then this is a problem because even if I wanted to do it, I can't.

The setting of the course start date upon restore (to existing, deleting it OR to new course shell) should roll all activity dates forward relative to the course start date as described by this Moodle.org documentation: http://docs.moodle.org/en/Roll_courses_forward [In other words, if affects not just forum posts but all activities added to a course through the add an activity menu with open/close dates set]. As of current, this behavior is not functioning. Indeed, the roll of dates by setting the course start date upon restore tends to roll dates to arbitrary "years" (such as 1999, or 2000) upon restore of a course.

A secondary problem (possibly another tracker item) is that instructor pre-seeded discussion forums (courses restored with user data) do not restore in the new course shell. There is a "ghosting" problem - where if forum tracking was enabled, the course mainpage will display unread forum posts (those that were pre-seeded by the instructor and restored) but upon entering the forum the posts do not exist. We tried restoring the course to a new shell, with a course start date in the past and assigning the instructor to the course with unlimited enrollment from the course start date and this did not resolve the problem either.

Also note: Restore with setting "course start date" can only be triggered by the systems administrator (or course creator, I believe) - NOT a user in the teacher role. This defeats the purpose of allowing faculty to restore a course. So, we tried allowing faculty to restore a course and then reset it - as the "reset" has a section where faculty can trigger a reset of the course start date - and AGAIN the activity dates do not roll forward.


Mary Parke added a comment - 06/Dec/08 02:43 AM
I'm attaching a video of how an institution would use this roll-forward process: http://www.screencast.com/users/mmparke/playlists/CCSF%20Insight%20Sem2Sem%20Go%20Live.

Additionally, here is a link to a .pdf of this ideal process: http://content.screencast.com/users/mmparke/folders/InsightSem2Sem/media/8a98be8d-984e-4f47-849c-5da38b68d994/Sem2SemGOLIVEInsight.pdf?downloadOnly=true

Credit goes to Lane Community College, Oregon for the guts of Steps 1 and 2 in this process.


Mary Parke added a comment - 06/Dec/08 06:10 AM
I realize my posts may be another issue. If they are, can we split them to another tracker? Many thanks, Mary

Clark Shah-Nelson added a comment - 24/Dec/08 11:59 PM
It would be very handy if this date rolling would work in the "import" course process, in addition to backup/restore. I'm not sure if they use the same process or not, but having faculty members have the ability to use "import" so they don't need to download/upload a backup file would be great - especially if the import process would bring in all blocks, summaries, course forced theme, number of weeks/topics, (all settings) and roll the dates forward - in other words, make an exact duplicate copy of the older course, minus the old student users and keeping any new users.

Automatically rolling the dates based on the course start date would be a huge time saver! Manually changing all activity dates is one of the biggest drags on productivity in online courses.


Tim Hunt added a comment - 26/Dec/08 08:32 AM
They do use the same underlying process. Probably all that is missing is the place to let you choose this option, but I am guessing.

Mary Parke added a comment - 25/Apr/09 01:13 AM
As a systems administrator attempting to perform the below functions, this "roll forward" of activity open/close dates upon either

a) restore of a course from existing backup file (where course is set to weekly format and activities have open/close dates set relative to the week) to a new shell with setting the new course start date to the new semester start date

  • OR -

b) via reset of an existing course and setting course start date to the new term start date

is STILL NOT WORKING.

We need this function to work. I don't even care about discussion forum dates not rolling forward anymore - I'd be satisfied if the assignment and quiz open/close dates would roll forward AS PROMISED in the documentation at this point.

I've 150 courses to roll for the next semester and this feature is STILL not working - and our faculty aren't too happy about this since this was a "selling point" of the software over WebCT...just saying!

We're on Moodle 1.9.4+ (Build: 20090320).

Any assistance on this "bug" would be greatly appreciated.


Mary Parke added a comment - 25/Apr/09 01:25 AM
There also seems to be a few issues with restore/reset and the trigger of "rollover dates" depending upon the use-case scenario - and I believe that it is the use-case that is in conflict with perhaps the behaviors programmed for this feature (programming does not match use-case or programming should match use-case but is not working):

A. reset of existing production course at end of term to trigger activity dates update and purge of user data for upcoming term - assuming the course is going to be reused rather than saved in its existing state for archival purposes (or for makeup of incompletes)

B. reset of a development course to trigger date change for term it will be taught in (development cycles can vary over course of 1 - 4 terms or more depending upon funding of the course and course readiness, so while dates may be set to one term while developing, they may need to be updated to reflect the term the course will be taught in with live data)

C. backup and restore (without user data) of an existing production course to a new course shell in a category staged for the upcoming term - whereupon the restored course is set to trigger the new course start date for the weeks - which should update the activity open/close dates within those weeks relative to the new week date range or the open date of the course; if restore fails to update these dates, then reset should have the option of updating these dates.