Log of /branches/bw/webwork2/lib/WeBWorK/ContentGenerator/Options.pm
Parent Directory
Revision
6923 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 6 23:35:51 2011 UTC (22 months, 2 weeks ago) by
gage
File length: 6580 byte(s)
Diff to
previous 6748
Made changes that locate the Localize handler in $r
the WeBWorK::Request object which is unloaded in nearly every subroutine.
At the moment this seems more appropriate than trying to create a WeBWorK object.
WeBWorK.pm is basically a dispatch routine, which creates a request object and then
initializes it.
The biggest obstacle is handling URLPath. In each case the name of a segment needs a
translation for display purposes. This can't be done statically because, while the paths
are static, the language is not determined until the request comes and might be different
for each course. To handle this we have added an extra parameter (the second one) whenever
a URLPath is created which must be a WeBWorK::Request object. Now the URLPath object knows
the "parent" request that it belongs to and from that can determine language to use for
translation. This involved a lot of routine changes which were done with massive search and
individual replace. There are also checks in the creation routines for URLPath which
insure that the second argument is a WeBWorK::Request object. This reduced errors during the change over.
Going forward the differences are only that one uses $r->maketext() instead of $LH->maketext()
and in the global.conf (overridden by the courses.conf file) there is a new item:
$language = "tr" (or "en" or "fr" );
We need more Translation files in Localize, We need error messages for non-existentant languages.
and eventually we will want easier customization (via Course Configuration or perhaps even individual
preferences)
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
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Options.pm
File length: 4064 byte(s)
Diff to
previous 1636
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.
################################################################################
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.