Forums | Mahara Community

Support /
View Access Dates Shifting


anonymous profile picture
Account deleted
Posts: 13

15 April 2010, 12:15

I opened a bug for this issue here:  https://bugs.launchpad.net/mahara/+bug/564001

But wanted to check in on the forums as well to see if anyone else had seen this behavior:

After assigning start and stop dates in the View Access page and saving, the dates will automatically change.  We've continually had it change the start date to date in 2018, and the end date to date in 2001. This results in the view share failing every time a student uses the date field.

It's causing big problems for us, as well-intentioned students are entering dates, and causing havoc when non of their views are visible. 

Thanks!

 

- Jesse Friedman

UCSF Office of Edu Tech

 

Yaju Mahida's profile picture
Posts: 131

27 April 2010, 18:20

We encountered the same problem. In our case the dates shifts to Start Date as 1968/05/10 08:02 and End Date to 1976/11/09 16:53.

Even you try to set it for two days or just one day it shifts to 1968 as start and 1976 as end date.

Yaju Mahida's profile picture
Posts: 131

27 April 2010, 19:30

We recently upgraded from Mahara 1.2.2 to 1.2.4.

I have verified that this only happens with Mahara 1.2.4 not with 1.2.2.

In 1.2.2 this works smoothly as expacted.

 

 

Yaju Mahida's profile picture
Posts: 131

29 April 2010, 1:05

Hi we have found the cause for the problem. Our servers uses PHP version 5.1.6.

Mahara 1.2.4 uses PHP function strptime (htdocs/view/access.php) for parsing dates using the correct format from the language pack on view access page.

A bug report about strptime function is already reported in PHP version 5.1.6 (http://bugs.php.net/38524 Bug #38524 strptime returns random values for unparsed parts). strptime returns random values for parts not included in the format string.

This is causing the problem. I am not able to create my account (bug at launchpad !) on launpad.net to comment.

What is the minimum version of PHP supported by Mahara ?

 

anonymous profile picture
Account deleted
Posts: 808

29 April 2010, 16:39

Thanks Yaju, that's great that you found the problem!  I don't know how I would have diagnosed that one.

The minimum PHP version for Mahara is 5.1.3, but I don't think we need to change that.  We already have a workaround strptime function sitting in view/access.php for Windows users, so we could just call that instead of the built-in strptime whenever we know that the built-in one is bad.

Do you the number of the first PHP version with the fix?

Yaju Mahida's profile picture
Posts: 131

29 April 2010, 18:32

PHP 5.2.0 version fix this problem

Yes I have seen that windows thing in code. We are going to implement the workaround for this.

The problem is with our DEV/TEST and PRD environments where we uses Redhat 5.5 and standard PHP package is 5.1.6.

We are also thinking to upgrade this standard package with latest 5.3.x (download it and building it for 5.5....far from standard one)

 

 

 

Paul Nijbakker's profile picture
Posts: 10

19 May 2010, 2:45

Hi all,

We have exactly the same problem. Changing to PHP 5.2 is not an option in the short term. So, how can I solve this problem with the resetting dates? (It's a mystery to me why the software seems to have this odd preference for 1968 and 1976)Undecided

Rgrds,
Paul.

Yaju Mahida's profile picture
Posts: 131

19 May 2010, 20:13

We also have decided to switch to PHP 5.3.2 as soon as possible. This will ensure that in future we are not going to hit by something like this. Really pain !

Please, read the post of Richard Mansfield at - https://bugs.launchpad.net/mahara/+bug/564001

 

Richard Mansfield wrote on 2010-05-11: #8

As discussed on that forum thread, I think the easiest fix is to check in view/access.php what the php version is, and if it's less than 5.2.0, make sure you call that workaround version of strptime that's sitting inside the "if (!function_exists)..." bit, maybe using a different name to avoid declaring the same function twice. If you attach a patch here we'll apply it to the Mahara 1.2 series.

 

 

 

8 results