All bulk Import Course Start Dates change

Re: All bulk Import Course Start Dates change

by Colin Fraser -
Number of replies: 6
Picture of Documentation writers Picture of Testers

First... erm, why did you "recently update...from 2.51" and you went to v2.5.9? That is a year out of date already.... but I am assuming that you know this and there is a specific reason for you to just update in a minor change. Not relevant I think and not being critical, but is interesting to get another perspective on updating policies. 

AFAIK, Moodle gets it date/time from the local server, so is it possible the date given by the server is incorrect? The error is consistent, a week between Dec 31 and Jan 6 and Aug 17 and Aug 24. Have you checked the Site Admin > Server > PHPInfo page, the date and timezone should be correct there. 

The only other thing I can think of is that the restoration of courses from last year has kept the day/date from that year. What date did you start then? Is that possible? So if you can find that, then you might be able to solve the problem. 

In reply to Colin Fraser

Re: All bulk Import Course Start Dates change

by Jamie Tinley -

Hi Colin,

Thank you for replying.  You are right - my admin/server/php info says the BUILD date is January 6 2011 and further down I see date for 'Olsen' timezone. I'll attach a screen shot.  My server says 8/20/2015 so my date should be right if it pulled it correctly from my server. Maybe I need to edit my config file or something to pull the date correctly?

As to why I upgraded to a system that is still a year old . . .   Several reasons - but the biggest is that I went to a seminar that recommended I not upgrade unless I have to (the if it is not broken don't fix it mentality). 

Since I'm on a production server and depend on 3rd party plugins like Elluminate (BBC) I hesitate to change much when it is working.  

Despite installing Moodle a dozen or so times in the last 10 years I still run into trouble sometimes even on upgrading.  Plus I forget even simple things it seems like where you found the date because I only dig into things like config.php once every other year.

Thanks again,

Jamie

Edit - I see where the Olson file is located by going back to admin/location/update timezones (which I've done)

it says 

This page will search for new information about world timezones (including daylight savings time rules) and update your local database with this information. These locations will be checked, in order: 

C:\moodledata/temp/olson.txt
C:\moodledata/temp/timezone.txt
http://download.moodle.org/timezone/
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\moodle/lib/timezone.txt

The first two paths do not exist in my server so i could not find olson.txt nor timezone.txt

I did find the last location ...moodle/lib/timezone.txt   opening it seems like every timezone in the world but it's a long file so I'm not sure if my location and time are in it somewhere.  This kind of experience seems to be why I don't upgrade much - it was working fine now something as simple as a date and time I'm having trouble finding. I'm sure it's easy but I can't seem to figure it out yet. Thanks again for your expert help.

edit: could this tracker issue have something to do with it?

Attachment php date.jpg
In reply to Jamie Tinley

Re: All bulk Import Course Start Dates change

by Jamie Tinley -

looking at my logs I see my Moodle time IS correct there. I don't know where else to look for moodle time and I'm not sure what the phpinfo.ini Date of 2010.15 means as that has not changed in the last few days.  

I wonder if ONLY my date is wrong for my bulk import courses and not all of Moodle. I had to add that module back in from my working but archived 5.1 Moodle. Perhaps it takes my csv date of 8.17.2015 and in this version of Moodle changes it to 12.26.15  or something like that.  I tried to change my admin/location settings to be utc-7 for pacific and in config.php for moodle I removed the // so that this text works there too

date_default_timezone_set (

America/Los_Angeles); but I see no change on my Moodle logs or last cron run (both are right). I'll have to bulk add a course and see if it only affects the date there for some reason.


Thanks for figuring this out with me and hopefully it will help someone. BTW, I'm on a dreaded windows machine as I have yet to switch to Linux although I do have a test moodle up in Linux with the plan to move later to it.


In reply to Colin Fraser

Re: All bulk Import Course Start Dates change

by Jamie Tinley -

SOLVED!  All my dates were just fine.  For some strange reason what previously worked for 3 years to create the correct start date when doing bulk import courses using this format (mo.day.year) in 2.5.1

Test modayyear,Test modayyear,FAQ Training,Test modayyear,weeks,1,08.17.2015,15,1,afterburner

failed after I updated to 2.5.9  BUT the good news is this format (Day.Mo.Year) works fine:

test daymoyear,test daymoyear,FAQ Training,test daymoyear,weeks,1,17.08.2015,15,1,afterburner

Hooray!  it works again!

In reply to Jamie Tinley

Re: All bulk Import Course Start Dates change

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Glad to put you on the right track, Jamie, and congratulations for persisting with it. 

Update policies... what a minefield. I have worked with several different update policies, and they have all been challenging in their own way. 

One updated with every minor version release, staying current, but this not only created issues with maintaining the Moodle, it also presented time issues, with pressure being placed on the staff who were responsible for doing the work. Every month, basically, one of them would be up at 1:00am on a Sunday morning, to upgrade the Moodle. Dramatic failure when one guy said he wasn't doing it any more so sack him or find another policy! They then changed to twice a year and few complaints since.    

My small Moodle upgrades once per year, during the annual holiday cycle, and they are happy with it. Works well for them, but is a small Moodle.  

Another I worked on will not update top the latest, but to the previous latest, twice a year. That is what they choose, and no-one has ever explained the reasons why. A guess would be that the latest may hold a bug or two, possible, whereas the previous latest has been tested, well used, and would have had any major surprises removed. 

All others have been variations on this. My schools Moodles are all controlled by one Moodle Partner, sensible, but getting things done can be an issue. Just to get the progress bar available has had to go through so many layers of bureaucracy it is ridiculous. They update once per year, i understand. Never bothered to confirm this.. but... as they say, not my problem. 

This is just for your information, and anyone else who reads this. My bet would be there are so many different attitudes and policies out there that, essentially, it has to be an enterprise decision. That is, what is my enterprise? what do I want it to achieve? what are the best tools available to achieve my enterprise goals and so on. If you have a huge Moodle, like OU, for instance, you will need a consistent and definitive policy, but if it is 'Greta Garbo Home for Wayward Boys and Girls', then it would likely be, "when I think of it." Needs must, I suppose, but I suggest any longer than a year behind, you are probably putting yourself under more pressure than necessary. 

In reply to Colin Fraser

Re: All bulk Import Course Start Dates change

by Jamie Tinley -

Thanks Colin for sharing your variations on upgrading as it's good for me to hear how others do it. I need to update more often and I think I'm going to try updating to the latest one that our all important 3rd party currently supports, Blackboard Collaborate.  I used to put every new add on I could find like a kid in candy store but that's caused issues so now I've become a bit too cautious on upgrading and I know my users would love the new features so maybe I'll ride the 2nd wave for now on. Thanks for helping me muddle through my problem and giving me insight which led me to checking my thinking and assumptions.

In reply to Jamie Tinley

Re: All bulk Import Course Start Dates change

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Jamie, well you did all the work, so good for you... Pick a policy and stick to it. Upgrades are always tricky when you are using a lot of non-core and third-party plugins. For my small Moodle, only one now, I don't add a lot of plugins in, only two these days, which keeps it simple, and easy to upgrade. One other I worked on did have a number of T-PPIs, which became a real issue when we went up to V2 and again when a lot of the T-PPIs were not updated to match the new criteria for V2.x. I understand they have since developed a review process which asks some rather hard questions about adopting a non-core or T-PPI, which is a really good idea. My current employer has a code review as well, before presenting a request for inclusion by the Moodle Partner. No idea why, I suspect it is a simple bureaucratic device to throw impedimentia into any forward progress as a way of covering their own backsides if it goes wrong. The main thing is to keep the admin time required to maintain operations to a minimum, which keeps everyone happy.