Student Activity Report all same date after Course Restore

Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Number of replies: 14
Picture of Particularly helpful Moodlers

I just upgraded from 2..5.4 to 2.6.5 and am testing backups and restores.

I backed up and restored a course. Looks fine. Material is there, student are there.

When I examine a student's activity report for this course the students activity is lumped together under 1 date, the date of the restore.

When restoring I selected delete current course contents and restore into it. The original backed up course has several dates listed for the students activity.

I would like to retain the dates for auditing purposes. Is this normal for moodle restores to lose student activity dates and default to the date of the restore?

Average of ratings: -
In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Are you overwriting the new course config?  What is the start date for the restored course?

In reply to Emma Richardson

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

re: Are you overwriting the new course config? 

I have restored with the following details:
'Restore into this course'->select 'Delete the contents of this course and then restore'

I also tried 'Restore as new course'. Same result.

Is there some other way I should be restoring a course to retain the student activity dates?

I use a Windows Server with IIS, do you think there's some date formatting incompatibility (Unix time)?


re: What is the start date for the restored course?

It was the same day in which all the student activity reports were lumped together on. I then tried editing the course to make the start date far in the past and do the restore again, still got the same result, all student activity dates are the day of the restore even with a start date 1 year earlier than the student activity.



In reply to Emma Richardson

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

re: Are you overwriting the new course config?

UPDATE: just found the setting you were referring to, I went with the default of 'no'.

In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I would try setting that to yes and making sure that your course start date is set to the actual start date of the course and not to the date of the restore.  Also make sure that you have logs selected in  your backup settings.

In reply to Emma Richardson

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

I did as suggested, still no luck.

Here's a screenshot of the setting and outcome at the bottom for a sample student (in the live course the logs indicate dates other than today)


In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

Can anyone tell me which database table the dates are for student activty reports?

My second step is to look at the course backup file itself to determine whether the dates where backed up correctly to begin with. I've never peered into a course backup file before, anytips to find the student activty report dates?

 

In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

I ran the restore with Full Developer Debugging Mode on and received the following message, I'm only posting an excerpt as its very long:

setting controller status to 800
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-submit" unknown. Not restored
Log module-action "assign-view confirm submit assignment form" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-submit for grading" unknown. Not restored
Log module-action "assign-view submission grading table" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-submit" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-view confirm submit assignment form" unknown. Not restored
Log module-action "assign-submit for grading" unknown. Not restored
Log module-action "assign-view submission grading table" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-submit" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-submit" unknown. Not restored
Log module-action "assign-view submit assignment form" unknown. Not restored
Log module-action "assign-view confirm submit assignment form" unknown. Not restored
Log module-action "assign-view submission grading table" unknown. Not restored
Log module-action "assign-submit for grading" unknown. Not restored
Log module-action "assign-submit" unknown. Not restored

etc............

Log module-action "course-update" process problem. Not restored
processing file aliases queue
setting controller status to 1000
saving controller to db

In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

I've backed up a 2.5.4 course and restored into 2.6.5 course and on a separate installation of 2.6.5 course and restored to a 2.6.5 course, still get the same problem of Student Activity dates all becoming the same date the restore is done on.  I can backup and restore on 2.5.4 properly, activity dates are retained. Having experienced this problem on 2 separate installations of 2.6.5 it appears to be an issue with this version on my system configuration?


Can anyone speculate whether this is related to the Windows environment I work in?


===========================
My environment is Moodle 2.5.4 Windows 2008 server, IIS 7.5 , php 5.5, 14gb Memory, 4 cpu
My
sql1 on seperate server, same specs as above: Mysql server 5.1, windows 2008 64 bit
Zend Extension Build API220090626,NTS,VC9 PHP Extension Build API20090626,NTS,VC9 Thread Safety disabled System Windows NT MOODLE2TEST 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 Build Date Aug 15 2012 19:57:50 Compiler MSVC9 (Visual C++ 2008) Architecture x86

In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

Currently trying to figure out where the logs are inserted from during the Restore process from restore_controller.class.php , can anyone suggest anything to narrow it down?


While fumbling about I discovered $resetdata->reset_logs = true; in course.php which sounds like it resets logs days to today, my logs appear to be 'reset' to today but that doesn't explain the ip address and other fields being incorrect as well.



In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Paul,

I just wanted to say that i have the same problem, with Moodle 2.7.2+, on a linux box sad

Don't know if a tracker item already exists for that.

And in 2.7, they're considered has "obsolete logs method".

For the new (2.7) log method, things are worst : logs are not backed-up/restored : see MDL-46455 sad

Séverin

In reply to Séverin Terrier

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers
Thanks for the notice, I was thinking about skipping 2.6 and going to 2.7 to see if it fixes the issue.
In reply to Paul Lindgreen

Re: Student Activity Report all same date after Course Restore

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

Same problem occurs when backing up a 2.6 course and restoring it to 2.6, Student Activity log dates all revert to the day of the backup and the ip address is destroyed. I was directed to the following ticket https://tracker.moodle.org/browse/MDL-44961