Log of /trunk/webwork2/lib/WeBWorK/Utils.pm
Parent Directory
Revision
2858 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 4 18:28:16 2004 UTC (8 years, 7 months ago) by
sh002i
File length: 22155 byte(s)
Diff to
previous 2829
,
to
selected 412
complete rewrite of parseDateTime to close bug #693.
- using modified version of WW1's unformatDateAndTime() function for
actual parsing.
- intelligent treatment of two, three, and four digit years consistent
with Time::Local.
- attempt to interpret time zone specification using DateTime::TimeZone
and then Time::Zone. if neither succeeds, an expection is thrown.
- if timezone is not specified, $display_tz is actually used.
It never ceases to amaze me how tricky time zone handling is. It appears
that I have it right now, but please test.
Revision
2770 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Sep 11 06:15:14 2004 UTC (8 years, 8 months ago) by
sh002i
File length: 17359 byte(s)
Diff to
previous 2769
,
to
selected 412
PRELIMINARY SUPPORT FOR TIME ZONES (towards closing bug #532).
(1) new configuration variable $siteDefaults{timezone}
Set the default timezone of courses on this server. This must be a value
valid for the TZ environment variable. See also tzset(3).
If left blank, the system timezone will be used. This is usually what
you want. You might want to set this if your server is NOT in the same
timezone as your school. If just a few courses are in a different
timezone, set this in course.conf for the affected courses instead.
(2) support for second optional $display_tz argument to formatDateTime()
and parseDateTime().
If specified, formatted string datetimes will be considered to be in
that timezone instead of the server's local timezone.
Remaining work:
find all calls to *DateTime() and add the $client_tz argument.
$client_tz is is really something that *DateTime() should be able to
grab out of $ce, but they're not a method on ContentGenerator, so we
have to pass it in. It might be worth moving them to ContentGenerator.
(Or some new subclass of ContentGenerator or something?)
Revision
2082 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 11 19:07:54 2004 UTC (9 years ago) by
gage
File length: 11636 byte(s)
Diff to
previous 2003
,
to
selected 412
Added surePathToFile utility called as
surePathToFile start_directory path
(the path can be the full path including the start_directory segment)
If the start_directory is the tmp directory then one has the effect of
surePathToTmpFile defined in IO.pl
Revision
1663 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 9 01:12:32 2003 UTC (9 years, 5 months ago) by
sh002i
File length: 9674 byte(s)
Diff to
previous 1529
,
to
selected 412
Normalized headers. All files now contain the text below as a header.
This is important since all files now (a) use the full name of the
package, (b) assign copyright to "The WeBWorK Project", (c) give the
full path of the file (relative to CVSROOT) instead of simply the file
name, and (d) include license and warranty information.
Here is the new header:
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2003 The WeBWorK Projcct, http://openwebwork.sf.net/
# $CVSHeader$
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the
# Artistic License for more details.
################################################################################
Revision
1492 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 9 02:00:07 2003 UTC (9 years, 8 months ago) by
gage
File length: 9117 byte(s)
Diff to
previous 1481
,
to
selected 412
Modified parseDateTime so that it handles time strings of the form
01/03/03 at 06:00am. The " at " retains compatibility with webwork 1.9
which is important for import and export. This fixes a bug introduced
when changing formatDateTime. #204 and #203 should be fixed by this.
--Mike
Revision
1481 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 5 03:39:15 2003 UTC (9 years, 8 months ago) by
gage
File length: 9005 byte(s)
Diff to
previous 1397
,
to
selected 412
Added " at " in formatDateTime function. This makes it compatible with webwork1.9
which is important when we export set definition files. this may ruin
some earlier aesthetic considerations (Dennis?) but the compatibility
is more important than that in this case.
--Mike
Revision
1397 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 16 12:58:29 2003 UTC (9 years, 10 months ago) by
gage
File length: 8952 byte(s)
Diff to
previous 1387
,
to
selected 412
Abstracted "read directory" functions in SendMail and moved them
to Instructor. The instructor calls WeBWorK::Utils::readDirectory
and then filters the output according to a pattern match. Sorts as well.
Also move read_scoring_file to instructor since it will need to be used
in other scripts as well.
--Mike
Revision
1387 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 15 00:56:50 2003 UTC (9 years, 10 months ago) by
gage
File length: 8852 byte(s)
Diff to
previous 1287
,
to
selected 412
Changes made to make show Past answers work. Basically I duplicated
writeLog with writeCourseLog which writes to the courses log directory.
I also defined answer_log in that directory.
Revision
1045 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 6 19:13:51 2003 UTC (9 years, 11 months ago) by
malsyned
File length: 6378 byte(s)
Diff to
previous 984
,
to
selected 412
Took out the redundant "confirm email address" from user options.
Also, added a Util function "backtrace", which can be passed one of
"die", "warn", "print", or "return". I'm just showing off, but it might
prove useful in debugging.
-Dennis
Revision
692 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 7 21:19:38 2003 UTC (10 years, 4 months ago) by
sh002i
File length: 5644 byte(s)
Diff to
previous 667
,
to
selected 412
DONE effectiveUser for at least Problem.pm
DONE write a template escape for printing $user, $effectiveUser, &c. nicely
also added additional timing log points: timing is now logged:
1. when WeBWorK::PG::new starts
2. after all the initialization-type stuff happens
3. when WeBWorK::PG::new ends
Getting it to log the entire request time might be a little harder.
-sam
Revision
646 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 23 00:25:40 2002 UTC (10 years, 5 months ago) by
sh002i
File length: 5935 byte(s)
Diff to
previous 631
,
to
selected 412
added REAL logout support. keys now get invalidated at logout.
also, fixed a bug in classlist (see the diff).
also, added a sub to Utils (see the diff).
-sam
Revision
562 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 27 23:53:42 2002 UTC (10 years, 7 months ago) by
sh002i
File length: 5258 byte(s)
Diff to
previous 558
,
to
selected 412
- created macros/IO.pl, which is loaded with no opmask by PG.pm. It is a copy
of WeBWorK::PG::IO.pm, with some changes to make it work as a macro package.
The translator no longer shares IO.pm's functions with the safe compartment.
This is a BAD THING, and should be reconsidered when the Translator is
revised.
- Changed many (but not all) checks for HTML or HTML_tth modes to match /^HTML/
in the macros.
- changed &header to &head in Problem.pm
- Added problem environment variables for gif2eps and png2eps and modified
&dangerousMacros::alias to use them
- fixed MOST of the harmless warnings in the system. there's still the "Use
of uninitialized value in null operation" warning in template(), tho.
Still to come:
- make images in PDFs work
- fix TTH mode character encodings on mac (maybe)
- have logout button invalidate key
- Pretty die messages (from outside of the translator)
- Feedback - need nice modular way of sending email
- Options - email address and password
Revision
558 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 20 22:47:22 2002 UTC (10 years, 8 months ago) by
sh002i
File length: 4867 byte(s)
Diff to
previous 494
,
to
selected 412
* fixed multiple-calls-to-&handler problem
* fixed if-else-endif code in &template
* added code to catch warnings in PG evaluation
* added "pink screen" and warning reporting
* started work on logging code (see Utils.pm, commented out)
-sam & dennis
Revision
455 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 5 21:34:18 2002 UTC (10 years, 9 months ago) by
sh002i
File length: 4489 byte(s)
Diff to
previous 445
,
to
selected 412
"normalized" files:
- (c) header on all files
- standard order of preamble lines:
1. (c) header
2. package PACKAGENAME;
3. short summary of the package (pod's NAME section)
4. use - pragmatic modules
5. use - standard perl modules
6. use - CPAN modules
7. use - webwork modules
- ALWAYS use strict and use warnings
- use "use base" rather than "our @ISA"
so now we can be happy.
-sam
Revision
424 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 11 19:09:08 2002 UTC (10 years, 10 months ago) by
sh002i
File length: 4607 byte(s)
Diff to
previous 422
,
to
selected 412
Problem.pm/PG.pm/Translator.pm now compile and work (to some degree)
changed the format of pg/modules in global.conf
diddled with the format of system.template (i believe i moved an <HR>)
added ref2string function to Utils.pm, removed hash2string/array2string
fixed a package name in IO.pm
Revision
412 -
(
view)
(
download)
(
as text)
(
annotate)
-
[selected]
Modified
Tue Jun 25 20:29:22 2002 UTC (10 years, 10 months ago) by
sh002i
File length: 926 byte(s)
Diff to
previous 410
global: added some new hashes. learn how to use diff.
CourseEnv: new uses WeBWorK::Utils
WW: commented out a silly debugging function
IO: fixed package name
Translator: changed behavior of evaluate_modules and
load_extra_packages: they now update the instance variable directly to
avoid sharing modules that weren't asked for "this time".
-sam
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.