Wednesday, 31 December 1969 date on Assignment Submissions

Wednesday, 31 December 1969 date on Assignment Submissions

by Caryl Gordon -
Number of replies: 6

Hi,

I originally posted this last week and no one responded. We had more students and instructors report this issue over the weekend. Does anyone have any ideas or suggestions about how to tackle this escalating issue?

Thanks in advance for any and all help!

Caryl Gordon

------------------------------------------------------------------------------------------------------------

Hi,

We are using Moodle 1.9.19. We upgraded in October 2012 and in February started receiving reports that student assignment files are not uploading into the assignments.

The student will upload their file the and instructor does not see the file on the assignment submission page. However, I did log in as the student and when I click the assignment link, the file is there. When I am logged in as the instructor, I cannot see the file on the assignment submission page. On a hunch, I went the participants list, selected student name link, clicked the Activity report link and then clicked the Complete activity link. As the instructor, I could now see and access the file but it has an upload date of Wednesday, 31 December 1969, 07:00 PM (43 years 81 days early). Very strange!!!

What the student sees when they click the assignment link, the file is visible for him/her:

 

 

What the instructor sees on the assignment submission page:

The instrucor can see and access the file from the Complet activity page:

 

Any ideas on what is happening and how we can fix the issue? This is not widespread but has happened in 4 courses to 6 students.

Thanks,

Caryl Gordon

Average of ratings: -
In reply to Caryl Gordon

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Gary Sutcliff -

Did you install the one-way Time Machine addon? (-:

 

 

In reply to Gary Sutcliff

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Caryl Gordon -

Very funny big grin

However, this is a real situation which we need to figure out what is happening. So, if anyone has any suggestions, please let me know.

Caryl

In reply to Caryl Gordon

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Ken Task -
Picture of Particularly helpful Moodlers

Don't have a Moodle exhibiting the same issue so consider the following un-tested and really un-known, but, hopefully, will get you closer to resolution:

In the database for your Moodle, mdl_assignment_submissions table:

There are three fields related to time: timecreated, timemodified, timemarked.  All of those use UNIX epoch time.

UNIX epoch time example: 1229573101
Using a site that converts into 'humanly understandable':
http://www.epochconverter.com/
Copy and paste the number above.

Will return this:
GMT: Thu, 18 Dec 2008 04:05:01 GMT
Your time zone: Wed Dec 17 22:05:01 2008 GMT-6

There are also fields for 'assignment' (a number so assume that is the assignment ID number) and user id (probably student).  Use the mdl_assignment table to cross reference.

So a query like:

select userid from mdl_assignment_submissions where userid="52";

should show that students assignment submission data.

One could then edit the time fields to taste (it is thought).  Just to be safe, record what data was in there to something like notepad/textedit/a true text editor before replacing.

Assume have some tool to view/edit the database ... like phpmyadmin.

Do a database dump ... ie, backup your database ... *BEFORE* trying anything.

'spirit of sharing', Ken

In reply to Caryl Gordon

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is slighly less mysterious if you know that the zero-point of unix timestamps (which is how Moodle stores dates and times) is midnight 1st January 1970 UTC. Now, express that in your time zone, and presumably you get some time in 31st December 1969.

So, what is acutually happening is that Moodle is failing to save the date, for some reason, and then treating that missing date as 0 when it tries to display it.

I am afraid that does not really answer the question about what is going on, but it may explain a bit.

Now you have to work out what action it was that failed to register the right date. Can you reconstruct what was done? If you repeat those steps with a test user account, does the same thing happen?

A bug that can be reproduced is much easier to fix.

In reply to Caryl Gordon

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Ken Task -
Picture of Particularly helpful Moodlers

Since Tim has pointed out my error ... thanks for that ... use this instead

http://www.onlineconversion.com/unix_time.htm

Those that already have '0' entires need to be fixed, I would assume.

But, do agree that investigating why it's occuring is in order.

'spirit of sharing', Ken

In reply to Caryl Gordon

Re: Wednesday, 31 December 1969 date on Assignment Submissions

by Bodo Hoenen -

Hi Caryl, 

Were you able to figure this one out? do you know why the date was not being saved correctly?

I now have this issue occurring on some (not all) activities, and resources, and only for a few users, and even when looking at a particular user where this issue occurred, its not happening all the time. I cannot seem to find any common ground or connections between the errors. I was able to replicate the issue for users that had two roles in a course, but could not replicate the issue for users that only had a learner role.

Here are my test cases:

Test case 1 as a teacher:

  1. As a user that has both the teacher and learner role in a course, complete a quiz and a resource that both have completion tracking enabled As a teacher.
  2. Run the activity completion report for that course and download the CSV. 
    1. Looking at the completion information for the Quiz, the report shows:
      1. Completion status: Not Complete - (This is as expected as the user did not complete the activity as a learner)
      2. Completion date: Wednesday, 31 December 1969, 7:00 PM - (This is the incorrect date, and is probably due to no date being set and Moodle assuming the zero date)
    2. Looking at the completion information for the resource, the report shows:
      1. Completion status: Complete - (This is not as expected as the user did not complete the activity as a learner)
      2. Completion date: Monday, 24 June 2013, 8:43 AM - (This is the correct date and time)
         
Test case 2 as a Learner:
  1. As a user that has both the teacher and learner role in a course, complete a quiz and a resource that both have completion tracking enabled As a Learner.
  2. Run the activity completion report for that course and download the CSV. 
    1. Looking at the completion information for the Quiz, the report now shows:
      1. Completion status: Complete - (This is as expected as the user completed the activity as a learner)
      2. Completion date: Monday, 24 June 2013, 8:45 AM - (This is the correct date and time)
    2. Looking at the completion information for the resource, the report shows:
      1. Completion status: Complete - (This is as expected as the user completed the activity as a learner)
      2. Completion date: Monday, 24 June 2013, 8:43 AM - (This is the correct date and time)