WeBWorK Main Forum

Another Epoch-related Error

Another Epoch-related Error

by Louis Zulli -
Number of replies: 4
I create a new empty set. It appears in the list, with valid Open, Due and Answer dates. When I click on the underlined 0 in the Edit Problems column, I get

Error messages

The 'epoch' parameter ("") to DateTime::from_epoch did not pass regex check
at /usr/lib/perl5/DateTime.pm line 457
DateTime::from_epoch(undef, 'epoch', '', 'time_zone', 'America/New_York') called at /opt/webwork/webwork2/lib/WeBWorK/Utils.pm line 594
WeBWorK::Utils::formatDateTime('', 'America/New_York') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 2014
WeBWorK::ContentGenerator::formatDateTime('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...', '') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm line 478
WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldHTML('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...', 'zullil', 'TestSet', undef, 'WeBWorK::DB::Record::Set=HASH(0x7f0951869d80)', undef, 'open_date') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm line 381
WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldTable('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...', 'zullil', 'TestSet', undef, 'WeBWorK::DB::Record::Set=HASH(0x7f0951869d80)', undef) called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm line 1833
WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::body('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...', 'HASH(0x7f09517952c8)') called at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 152
WeBWorK::Template::template('/opt/webwork/webwork2/conf/templates/math/system.template', 'WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 491
WeBWorK::ContentGenerator::content('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 195
WeBWorK::ContentGenerator::go('WeBWorK::ContentGenerator::Instructor::ProblemSetDetail=HASH(...') called at /opt/webwork/webwork2/lib/WeBWorK.pm line 353
WeBWorK::dispatch('Apache2::RequestRec=SCALAR(0x7f09515e7eb0)') called at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 115
eval {...} called at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 115
Apache::WeBWorK::handler('Apache2::RequestRec=SCALAR(0x7f09515e7eb0)') called at -e line 0
eval {...} called at -e line 0
Call stack

The information below can help locate the source of the problem.

in Carp::confess called at line 457 of /usr/lib/perl5/DateTime.pm
in DateTime::from_epoch called at line 594 of /opt/webwork/webwork2/lib/WeBWorK/Utils.pm
in WeBWorK::Utils::formatDateTime called at line 2014 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::formatDateTime called at line 478 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm
in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldHTML called at line 381 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm
in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldTable called at line 1833 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm
in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 491 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 195 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork/webwork2/lib/WeBWorK.pm
In reply to Louis Zulli

Re: Another Epoch-related Error

by Hal Sadofsky -

My guess is that the set is not assigned to you. Somehow editing the problem list on a set that is not assigned to you creates a nasty error that isn't especially indicative of the problem.
In reply to Hal Sadofsky

Re: Another Epoch-related Error

by Louis Zulli -
Thanks. Your guess was correct, and the problem is solved (or worked-around, at least).

I notice that this "bug" is not present on our old production system, but is on the new developmental system I am testing. How should I go about getting this fixed?
In reply to Louis Zulli

Re: Another Epoch-related Error

by Hal Sadofsky -

Patient: Doctor, it hurts when I do this.

Doctor: Then don't do that!

No, seriously I don't think this has been fixed yet. This has certainly been around for a while (we're not on the bleeding edge, and we have this problem).

It isn't a serious problem once you know about it, but in terms of the likely future of more and more adoption of WeBWorK, it is the kind of problem that would be nice not to have. It is a less professional interface than either:

a) an error message telling you that you aren't allowed to edit the problem list unless the problem set is assigned to you.

or

b) automatically assigning problem sets to their creators

or

c) letting people edit problem lists even if the problem set isn't assigned to them.
In reply to Hal Sadofsky

Re: Another Epoch-related Error

by Louis Zulli -
Thanks again. Just wanted to make sure the issue was known.

As for fixes, it seems sensible to let a professor edit any set in a course, regardless of that set's list of assigned users. (But perhaps I'm missing something.)