Log of /trunk/webwork2/lib/WeBWorK/ContentGenerator.pm
Parent Directory
Revision
2804 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 21 19:51:45 2004 UTC (8 years, 8 months ago) by
toenail
File length: 40014 byte(s)
Diff to
previous 2775
,
to
selected 313
Changed instructor_set_detail from ProblemSetEditor to ProblemSetDetail
Removed instructor_problem_list
Changed some references from ProblemSetEditor to ProblemSetDetail
Revision
2775 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 13 19:29:08 2004 UTC (8 years, 8 months ago) by
sh002i
File length: 40007 byte(s)
Diff to
previous 2623
,
to
selected 313
added formatDateTime and parseDateTime methods that use the timezone
from the course environment if one is not specified and call the "real"
functions in WeBWorK::Utils.
Revision
2260 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jun 6 02:48:00 2004 UTC (8 years, 11 months ago) by
gage
File length: 37460 byte(s)
Diff to
previous 2257
,
to
selected 313
More tweaking for the position of the help question mark.
This is much better. It now has default names equal to the
title page name, lower case, spaces replaced by under bars.
Revision
2222 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 28 15:32:35 2004 UTC (8 years, 11 months ago) by
jj
File length: 36471 byte(s)
Diff to
previous 2161
,
to
selected 313
Try to work around IE bug: on left panel lines wrapped at every space. Those spaces are converted to non-breaking spaces. Ugly, but IE on windows is one of the most common browsers.
Revision
2034 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 7 18:47:23 2004 UTC (9 years ago) by
sh002i
File length: 34793 byte(s)
Diff to
previous 2030
,
to
selected 313
changed name of self-field used to hold the text for the message()
escape to "status_message" to avoid collisions with existing use of
"message" in CGs.
We should consider forming some kind of policy for this stuff. Maybe all
the fields that WeBWorK::ContentGenerator uses should be prefixed with
"CG_" or something. Thoughts?
Perl 6 would make this much nicer.
Revision
2030 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 7 18:21:19 2004 UTC (9 years ago) by
sh002i
File length: 34754 byte(s)
Diff to
previous 2014
,
to
selected 313
(1) removed "sendFile" mechanism -- use reply_with_file() instead
(2) moved addmessage, reply_with_{file,redirect} to a separate section
in the file, for data modifiers.
Revision
1911 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 23 01:08:41 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 33238 byte(s)
Diff to
previous 1898
,
to
selected 313
* systemLink changes: params can either specify param names in a list
(in which case all param values will be taken from the request) or
specify param names and values in a hash (in which case only undefined
values will be taken from the request). multiple values can be specified
for the same param by using an arrayref.
* added $self->reply_with_file() and $self->reply_with_redirect: these
can be called from pre_header_initialize to direct the CG to either send
a file or a location header. $self->{sendFile} and $self->{noContent},
as well as sending your own redirect headers, are now deprecated!
Revision
1882 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 15 04:09:56 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 29786 byte(s)
Diff to
previous 1880
,
to
selected 313
changed interface for systemLink to be more regular. you can now specify
a list of parameters to attach to the URL and a list of alternate values
for any parameter.
cosmetic changes.
Revision
1880 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 15 03:18:15 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 29379 byte(s)
Diff to
previous 1873
,
to
selected 313
all template escapes now use CGI::Pretty for better readability. (feel
free to convert other content generators -- replace "use CGI" with "use
CGI::Pretty.
all template escapes now print output directly instead of returning
things. (good for pipelining!)
Revision
1873 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 11 03:07:46 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 28805 byte(s)
Diff to
previous 1871
,
to
selected 313
finished extensive documentation and reorganzied file. this should be
much more usable now. also, the templater is now called from the new
content() method (instead of having special logic in go()).
Revision
1869 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 10 02:30:32 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 27093 byte(s)
Diff to
previous 1866
,
to
selected 313
removed templating code. (it's now in lib/WeBWorK/Template.pm.)
small fixes in links().
$ce/$db/$authz now taken from $r instead of from $self in many methods.
loginstatus() now uses urlpath.
CSS-ization.
Revision
1866 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 9 15:49:28 2004 UTC (9 years, 2 months ago) by
sh002i
File length: 30388 byte(s)
Diff to
previous 1861
,
to
selected 313
Added systemLink() method to take a URLPath and tack on the location
prefix and the authen args (if desired). Allows one to override any of
the authen args with new values (i.e. for changing effectiveUser).
Reimplemented links() using URLPaths and calls to systemLink() as a
test. Also, the output is now styled as nested unordered lists in the
class LinkMenu (see stylesheet).
Revision
1717 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 17 16:29:52 2004 UTC (9 years, 4 months ago) by
gage
File length: 21353 byte(s)
Diff to
previous 1681
,
to
selected 313
Cosmetic modifications to the user interface. Made "instructor tools" and
"problem sets" larger in the left margin.
This addressed bug 323 but may not solve it.
Revision
1681 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 18 23:15:34 2003 UTC (9 years, 5 months ago) by
sh002i
File length: 21217 byte(s)
Diff to
previous 1663
,
to
selected 313
- Assigner and SetsAssignedToUser now refuse to unassign sets from the
GlobalTableEmulator's "global user". Closes bug #283.
- New "unassign from all users" button in Assigner.
- Cosmetic changes to path() and title() in several modules.
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: 21137 byte(s)
Diff to
previous 1636
,
to
selected 313
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
1613 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 4 02:23:07 2003 UTC (9 years, 6 months ago) by
sh002i
File length: 20261 byte(s)
Diff to
previous 1600
,
to
selected 313
Finished Upload module. See POD.
Added sendFile routine to ContentGenerator. To use, store a hash
reference in $self->{sendFile} containing keys:
source: full path to file to send
type: content type of file to send
name: file name to suggest to client
This must be done BEFORE the HTTP header is sent, i.e. in
pre_header_initialize. It will not work is &go or &header is overridden.
Revision
1408 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 21 22:07:46 2003 UTC (9 years, 10 months ago) by
malsyned
File length: 17980 byte(s)
Diff to
previous 1384
,
to
selected 313
Added the capability for content generators to return an HTTP response
type other than OK.
Added the capability for content generators to bypass the template
processing (by providing a "content" subroutine)
Revision
1131 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 11 20:40:11 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 15704 byte(s)
Diff to
previous 1042
,
to
selected 313
Made many changes:
- turned off PG warning catching in conf/global.conf.dist
- added warning reporting to conf/templates/ur.template (but not to
other templates!)
- modified a couple of error messages in WeBWorK.pm
- made failure to create course environment and failure to find course
directory fatal errors in WeBWorK.pm
- added warning queueing and call stack storing to Apache::WeBWorK
- added "warnings" and "if_warnings" template escapes to
WeBWorK::ContentGenerator
- removed warning handling from WeBWorK::ContentGenerator::Problem
- code tidying in WeBWorK::ContentGenerator::Problem
- code tidying in WeBWorK::PG::ImageGenerator
-sam
Revision
1024 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 5 15:26:59 2003 UTC (9 years, 11 months ago) by
gage
File length: 15325 byte(s)
Diff to
previous 1018
,
to
selected 313
Fixed bug in navMacro and a bug in path.
This squashes bug #46.
The problem was a comma in the return, instead of a period.
return "foo"."\n";
returns foo with a return after it
return "foo","\n";
returns just the \n probably because the comma operation comes into
play and only the result of the last operation is returned.
Apparently return doesn't grab everything to the right of it in the same
way that print does.
I'd bet that
return("foo","\n") would return a list however.
--Mike
Revision
1017 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 4 23:47:35 2003 UTC (9 years, 11 months ago) by
malsyned
File length: 15505 byte(s)
Diff to
previous 836
,
to
selected 313
Instructor pages now only let instructors view and edit the database.
phew.
NOTE that there are new directives in global.conf.dist. You won't be
able to use the professor pages until you've made that change.
Also, I added new template escapes and updated the barebones and ur
templates.
-Dennis
Revision
809 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 17 21:30:57 2003 UTC (10 years, 1 month ago) by
sh002i
File length: 14836 byte(s)
Diff to
previous 798
,
to
selected 313
changed the name of the "courseEnvironment" field in the
ContentGenerator object to "ce", to match the style and conciesness of
the existing "r" and new "db" fields.
-sam
Revision
798 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 21 23:30:16 2003 UTC (10 years, 2 months ago) by
sh002i
File length: 14942 byte(s)
Diff to
previous 795
,
to
selected 313
initial support for WWDBv2:
- DB.pm finished (except for getGlobalUser{Set,Problem} methods)
- schema modules for password, permission, key, and user with
WWDBv1 hash-bashed backends
- GDBM driver
- wwdb command-line frontend
-sam
Revision
765 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 28 23:56:35 2003 UTC (10 years, 2 months ago) by
malsyned
File length: 14813 byte(s)
Diff to
previous 757
,
to
selected 313
removed "nowrap" from barebones.template because it wasn't doing
anything anyway, and every byte counts ;-)
Changed "Logged in as:" to "User:" in ContentGenerator and killed the
CGI::br calls in that message and the "Acting as:" message
Added more context to the context URL in Feedback, and properly
obfuscated some code.
--Dennis
Revision
748 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 26 18:39:07 2003 UTC (10 years, 2 months ago) by
malsyned
File length: 14614 byte(s)
Diff to
previous 737
,
to
selected 313
Added the <!--#if loggedin="1"--> template escape. It evaluates to true
on every content generator except Login.pm and Logout.pm. Used it to
make the barebones template look cleaner on the login page.
-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: 13314 byte(s)
Diff to
previous 682
,
to
selected 313
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, 6 months ago) by
sh002i
File length: 12736 byte(s)
Diff to
previous 644
,
to
selected 313
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: 12578 byte(s)
Diff to
previous 558
,
to
selected 313
- 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: 12518 byte(s)
Diff to
previous 555
,
to
selected 313
* 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
512 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 23 22:19:51 2002 UTC (10 years, 9 months ago) by
malsyned
File length: 11615 byte(s)
Diff to
previous 508
,
to
selected 313
Added the <!--#if--> escape and the can="" clause, to hide features of the
page if the escape they contain is invalid in the current content generator.
Other things can be added to the &if later (such as checking if warnings have
occurred and changing the background color accordingly).
--Dennis
Revision
508 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 23 00:12:52 2002 UTC (10 years, 9 months ago) by
malsyned
File length: 10457 byte(s)
Diff to
previous 505
,
to
selected 313
HAHAHA!!!! I finally figured out a good way to do quoted strings with
backslash-escapes! Had to draw a damn Deterministic Finite-state Automaton on
the chalkboard, but it's all in the name of science, right?
--Dennis
Revision
476 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 20 01:07:18 2002 UTC (10 years, 9 months ago) by
sh002i
File length: 10491 byte(s)
Diff to
previous 469
,
to
selected 313
fixed problem with deciding when to generate images in math2img mode
finished adding template escapes to ProblemSets, ProblemSet, and Problem
fixed a problem where modules were removed from the courseEnv while
being loaded (whups.)
-sam
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: 5784 byte(s)
Diff to
previous 447
,
to
selected 313
"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
420 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 3 23:09:28 2002 UTC (10 years, 10 months ago) by
malsyned
File length: 4695 byte(s)
Diff to
previous 403
,
to
selected 313
ContentGenerator.pm: Changed names based on new course environment keys
Form.pm: New addition, handles anything param-able
Upload.pm: Will eventually make file uploads nice and easy vis-a-vis the
transparent relogin functionality
--Dennis
Revision
403 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 24 16:34:30 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 4555 byte(s)
Diff to
previous 397
,
to
selected 313
Removed the CARP code (for now?), and made sure that an actual problem was
reachable (even though PG evaluation is commented out in the dispatcher
right now)
Revision
390 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 19 22:45:47 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 4540 byte(s)
Diff to
previous 353
,
to
selected 313
This commit brings several packages up to date and working. I wish I could
be more specific, but it's been a while since I've committed. You'll have
to check the CVS diffs for more info.
--Dennis
Revision
353 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 7 23:35:59 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 2984 byte(s)
Diff to
previous 349
,
to
selected 313
All of the content generators now work with the template system
Moved the content generators into the WeBWorK::ContentGenerator namespace
Added the default template and a few global.conf entries
Revision
349 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 7 21:37:33 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 3204 byte(s)
Diff to
previous 323
,
to
selected 313
The framework for the template system has been laid in ContentGenerator.
Login.pm is the first module converted to work with that framework.
--Dennis
Revision
323 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 30 20:34:46 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 2991 byte(s)
Diff to
previous 313
-Fixed a few interfaces so that they make more sense (I hope)
-Added preliminary templating code to ContentGenerator
-Added a lot of logic to the dispatcher (WeBWorK.pm). More to come, too.
-Moved lots of things over to CGI.pm, for my convenience while prototyping
-Added preliminary examples of ProblemSets, ProblemSet, and Problem.
Problem.pm will some day go on to do what ProcessProblem8 does right now,
so keep your eyes on that one.
--Dennis
Revision
313 -
(
view)
(
download)
(
as text)
(
annotate)
-
[selected]
Modified
Tue May 28 21:23:45 2002 UTC (10 years, 11 months ago) by
malsyned
File length: 1850 byte(s)
Diff to
previous 305
- ContentGenerator.pm is now officially the superclass to all modules called
by the dispatcher to generate content.
- Authen.pm now has a single point of exit, which makes it easier to read,
debug, and modify
- Login.pm is now a subclass of ContentGenerator, and apart from the HTML,
is in it's final form.
- All code has been commented up
- The authentication wrapper is now a working demonstration. Anyone could
stick it on a webserver and try it out. The database code isn't written,
so it authenticates against hardcoded strings (username: dennis,
passwd: helloworld), but this at least proves that the system is workable.
--Dennis
Revision
305 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Thu May 23 20:23:10 2002 UTC (11 years ago) by
malsyned
File length: 738 byte(s)
Diff
to
selected 313
Login.pm is mostly done, except that the embedded HTML has to be replaced at
some point wiht code from HTML_glue or whatever new templating we implement.
Authen.pm and Test.pm are useful stubs to demonstrate how authentication wraps
around every request transparently.
ContentGenerator.pm may become a superclass of all classes instantiated by
the dispatcher, or it my whither away. Right now, it doesn't do anything,
including compile.
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.