Log of /trunk/webwork2/lib/WeBWorK/ContentGenerator.pm
Parent Directory
Revision
3583 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 28 20:54:51 2005 UTC (7 years, 8 months ago) by
jj
File length: 50639 byte(s)
Diff to
previous 3561
Allow use of an activity log which logs every click, stored on a
per-course basis. It is turned off by default. It can be turned
on/off for individual courses. The three pieces here:
global.conf.dist: adds a place to define the log file. Here an
empty value signals to not do this logging.
ContentGenerator.pm: check to see if the log file is defined (and
(non-trivial), and if so, write a log entry. We check if it is
defined at this point to both save some time, and because if we
get to writeCourseLog and the log isn't defined, we get a pink
screen.
The bulk of the text of the log entry is performed by a new method
prepare_activity_entry. By default, this gives the url, and a list
of all the cgi parameters (except for key and passwd). This method
can be overridden by individual modules. The default format may
change. It may take some fine tuning to see what is best.
Also, this is one of the first functions called by go. We may want
it to go after the action has taken place if we want instructor
modules to be able to report results of their work through this log.
SetMaker.pm: gives an example of overriding prepare_activity_entry.
SetMaker has lots (and lots and lots) of data stored in cgi
parameters. We probably don't want to log that. We might want to
log a little more in SetMaker than we do here (target set), but
this gives a start.
Revision
3561 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 24 16:58:12 2005 UTC (7 years, 8 months ago) by
jj
File length: 49587 byte(s)
Diff to
previous 3496
Fixed minor glitch where the toggle for show saved answers might be set wrong for the first time a student looks at a problem.
Revision
3496 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 12 23:33:06 2005 UTC (7 years, 9 months ago) by
jj
File length: 49428 byte(s)
Diff to
previous 3485
Print titles with underscores replaced by non-breaking spaces. It makes
the names of courses and problem sets look nicer for students. Also
removed a function which was already commented out, and not needed.
Revision
3485 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 12 02:47:30 2005 UTC (7 years, 9 months ago) by
sh002i
File length: 49497 byte(s)
Diff to
previous 3480
added HiRes timing data to WeBWorK::Debug, removed WeBWorK::Timing. all
existing calls to the WeBWorK::Timing methods now pass the same messages
to debug().
added an option to WeBWorK::Debug to allow only certain subroutines to
log debug messages, in addition to the existing option to bar certain
subroutines from doing so.
Revision
3480 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 11 22:10:30 2005 UTC (7 years, 9 months ago) by
sh002i
File length: 49455 byte(s)
Diff to
previous 3456
improvements to view options.
removed default options() implementation and helper function
viewOptions(), and added more modular optionsMacro() method, which is
intended to be called from content generators which require an options
panel.
POD for optionsHelper():
=item optionsMacro(options_to_show => \@options_to_show, extra_params =>
\@extra_params)
Helper macro for displaying the View Options panel.
@options_to_show lists the options to show, from among this list
"displayMode", "showOldAnswers", "showHints", "showSolutions". If no
options are given, "displayMode" is assumed.
@extraParams is dereferenced and passed to the hidden_fields() method.
Use this to preserve state from the content generator calling
optionsMacro().
This macro is intended to be called from an implementation of the
options() method. The simplest way to to this is:
sub options { shift->optionsMacro }
=cut
Revision
3448 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 1 22:03:38 2005 UTC (7 years, 9 months ago) by
sh002i
File length: 48312 byte(s)
Diff to
previous 3432
fixed indentation (see crabby reminder below).
The code I just fixed was using four spaces for one level of indentation
and a tab character for two levels of indentation. apparently, this is a
variation on the "use spaces for indentation" philosophy that also
replaces any run of eight spaces with a tab. this is NOT the way we've
been doing things in webwork, and consistency is important (I think).
===> the webwork indentation policy <===
We use the TAB character to indicate a level of indentation, and SPACE
characters to line things up in lists. I understand there is some debate
as to whether is it appropriate to use "hard" tabs in text files. We do
it because some of the WeBWorK developers prefer to view the code with
wider indentation (say, eight columns) and some prefer narrower
indentation (say, three or four columns). Thus, we use hard tabs for
initial indentation and let each developer chose a tab width using their
editor.
Here in an example of when to use tabs and spaces. ---> represents a tab
character.
my %errors = (
--->not_found => "The record was not found.",
--->invalid_id => "The record ID is invalid.",
--->undefined_or_unknown => "The record was undefined or unknown.",
);
sub bar {
--->my ($self, @recs) = @_;
--->foreach my $rec (@recs) {
--->--->my $Rec = $self->getRec($rec);
--->--->if ($Rec->error) {
--->--->--->warn $errors{$Rec->error};
--->--->} else {
--->--->--->foo($Rec->a, $Rec->b);
--->--->--->baz(
--->--->--->--->origin => $Rec->origin,
--->--->--->--->destination => $Rec->destination,
--->--->--->--->widgets_per_second => $Rec->widgets_per_second,
--->--->--->--->score => $Rec->score,
--->--->--->--->email_address => $Rec->email_address,
--->--->--->);
--->--->}
--->}
}
As you can see, indentation that is used to "line up" elements on
adjacent lines uses spaces, while indentation that is used to indicate
some structural heirarchy in the code uses tabs.
Revision
3432 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jul 30 01:49:44 2005 UTC (7 years, 9 months ago) by
gage
File length: 48329 byte(s)
Diff to
previous 3430
I've changed errorOutput($error,$details) to accept a reference to a string
or to an array for $details. These are automatically converted to the proper form.
References should be used when the $details points to a large number of bytes, such
as the contents of a file.
This version is not faster than the original method where $details was always a
string, sometimes a very long string. It does seem to save memory however.
Further savings in memory could be obtained by print directly, but there are a few instances
which call errorOutput and then do further formatting before printing.
At the moment it doesn't seem to be worth it to make the change from return to print.
Revision
3430 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 29 21:43:07 2005 UTC (7 years, 9 months ago) by
gage
File length: 47821 byte(s)
Diff to
previous 3429
Backing out of the changes just made for a moment. I've discovered that making this switch:
CGI::p(CGI::code($details)),
to
CGI::code(CGI::p($details)),
speeds things up immensly. (From 165 seconds down to 12 seconds on the example I'm doing.)
Even without any other changes. Since the other changes complicate things a bit, I'll put
off adding the ability to have $details be a reference.
It's possible that allowing $details to be passed as a reference is a good idea anyway,
on general principles. I want first to see if it makes a difference in terms of memory
consumption.
Revision
3429 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 29 21:27:48 2005 UTC (7 years, 9 months ago) by
gage
File length: 48160 byte(s)
Diff to
previous 3377
When print error output errorOutput($error, $details)
allow $details to be a reference to a string or a reference
to an array. This may not make much difference when the details
are short, but it can make a very large difference if the details
are long.
Revision
3377 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 14 13:15:27 2005 UTC (7 years, 10 months ago) by
glarose
File length: 47811 byte(s)
Diff to
previous 3310
Preliminary commit of changes to add Gateway module.
This adds to WeBWorK
- the ability to create versioned, timed problem sets ("gateway tests")
for which all problems are displayed on a single page ("versioned"
means that students can get multiple versions of the problem set),
- the ability to create sets that draw problems from groups of
problems, and
- the ability to create sets that require a proctor login to start
and grade.
Sets can be defined as gateway tests or proctored gateway tests from
the ProblemSetDetail page.
Not quite bug-free yet. Known bugs include handling of problem values
on the Student Progress page (I think this may be a problem with
changing from sql database format where all entries were 'text' to
sql_single in ver 2.1, where they are integer), and a division by zero
error on the grades page (which may be the same problem).
Tests with a number of attempts per version greater than one haven't
been carefully tested, nor has scoring of gateway tests.
Revision
3188 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Feb 27 04:05:48 2005 UTC (8 years, 2 months ago) by
gage
File length: 47432 byte(s)
Diff to
previous 3149
Still fiddling with the links so that one can jump from instructor
page editors to the actual display and back easily.
Revision
3110 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 27 00:15:55 2005 UTC (8 years, 3 months ago) by
sh002i
File length: 45845 byte(s)
Diff to
previous 3092
Moved stylesheet into a separate file. Created new htdocs/css directory,
added stylesheet to that directory (ur.css). Include stylesheet in
ur.template with new "url" template escape:
<!--#url type="webwork" name="stylesheet"-->
This is 132 lines that Template.pm doesn't have to parse and 4368 bytes
that don't have to get sent to the client with every request.
Revision
3090 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 15 18:46:57 2005 UTC (8 years, 4 months ago) by
gage
File length: 45023 byte(s)
Diff to
previous 3066
Commented out escapeHTML() of warning messages since it prevented
using tables when outputing info about answer evaluators.
Can someone tell me whether there is another reason why not allowing
HTML in warning messages is or would be important? If so we can
figure out another way to debug answer evaluators.
-- Mike
Revision
3031 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 17 16:53:01 2004 UTC (8 years, 5 months ago) by
gage
File length: 44802 byte(s)
Diff to
previous 3002
Make sure that the instructor links preserve the displayOptions, namely
the displayMode and the ability to view the old answers.
Revision
3001 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 18 16:04:37 2004 UTC (8 years, 6 months ago) by
gage
File length: 44855 byte(s)
Diff to
previous 2981
These changes elevate the Options panel to ContentGenerator.pm
Some of the changes are a bit hackish, but I believe that they
are sufficient for the moment. I expect much of the machinery
to be replaced by an "options" table in the new database.
The current options state consists of two values: displayMode (for
viewing equations) and showOldAnswers (for showing answers between
one session and the next). "Sticky answers" which show form entries
when the form is submitted and returned is a feature which is always on,
as I believe it should be.
Known bugs:
The options state is lost when visiting the Instructor pages, editing
problems, and probably sending instructor feedback. (I have made sure
that state was passed for the main links, I hope, but there are many
other possible links where state can get lost. My hope is that storing
state in the database will make it unnecessary to hunt down every link
where state needs to be preserved.)
Default options are set in the subroutine options in ContentGenerator.pm
This is called before body, where the option panel is displayed, but not
before the initialization phase. Modules that need options in the
initialization phase (currently only Problem.pm) need to set them
themselves.
Removed File Transfer from instructor links. File Manager works fine.
Revision
2927 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 15 04:30:20 2004 UTC (8 years, 7 months ago) by
sh002i
File length: 40933 byte(s)
Diff to
previous 2906
work on error and warning output. prettification of stack traces,
rewording of explanatory text, better logging, other stuff. a lot of
annoying crap, basically.
Revision
2906 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 12 20:27:35 2004 UTC (8 years, 7 months ago) by
sh002i
File length: 39697 byte(s)
Diff to
previous 2903
added link to FileManager to link menu. Link to FileXfer is still
present as well, for the time being. We may remove it soon.
Revision
2849 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Sep 29 21:38:06 2004 UTC (8 years, 7 months ago) by
sh002i
File length: 39345 byte(s)
Diff to
previous 2847
added permissions to allow disabling of feedback, options.
submit_feedback, change_password, change_email_address
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
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
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
2390 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 24 20:54:19 2004 UTC (8 years, 10 months ago) by
sh002i
File length: 38671 byte(s)
Diff to
previous 2383
removed incorrect "$r->status(OK)" line from reply_with_file. also
removed unused REPORT_BUGS_URL constant and reformatted remaining
constants.
Revision
2323 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 16 01:59:14 2004 UTC (8 years, 11 months ago) by
gage
File length: 38466 byte(s)
Diff to
previous 2260
My latest effort at a list of links. The "Add User" function can be accessed
from the Instructor Tools page or from the Class List Editor page
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
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
2257 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jun 6 00:21:26 2004 UTC (8 years, 11 months ago) by
gage
File length: 37268 byte(s)
Diff to
previous 2222
Added minimal version of a help symbol that will appear on each page.
The CSS at the top of the page needs work, so that not so much space is used.
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
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
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
(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
* 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
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
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
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
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
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
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
- 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
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
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
1430 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 24 21:52:17 2003 UTC (9 years, 9 months ago) by
gage
File length: 18665 byte(s)
Diff to
previous 1425
Added a module that shows the raw stats for a single set.
We need a better index page for this and other views of the
same statistics.
--Mike
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
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
1383 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 14 18:44:27 2003 UTC (9 years, 10 months ago) by
gage
File length: 17136 byte(s)
Diff to
previous 1374
Tweaked the links section a bit. Moved instructor links
into their own submethod, since they were getting complicated.
--Mike
Revision
1360 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 11 19:20:52 2003 UTC (9 years, 10 months ago) by
gage
File length: 16095 byte(s)
Diff to
previous 1358
Cosmetic improvements to the links macro. Instructor.pm
no longer needs a links macro, but I've left it there
temporarily
--Mike
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
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
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
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
817 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 23 06:39:03 2003 UTC (10 years, 1 month ago) by
sh002i
File length: 14840 byte(s)
Diff to
previous 809
rewrote these modules to use the WWDBv2 library. rewrote the Authen.pm
verify function to (hopefully) be more readable.
-sam
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
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
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
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
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
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
682 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 6 18:10:47 2003 UTC (10 years, 4 months ago) by
sh002i
File length: 13190 byte(s)
Diff to
previous 675
make answer previews use $displayMode
write a template escape for printing $user, $effectiveUser, &c. nicely
-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
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
644 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 22 20:30:20 2002 UTC (10 years, 6 months ago) by
sh002i
File length: 12580 byte(s)
Diff to
previous 643
Added "Options" handler, modified the dispatcher to support it, fixed
the link to it in the &links routine.
-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
- 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
* 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
526 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 29 19:56:24 2002 UTC (10 years, 8 months ago) by
sh002i
File length: 12595 byte(s)
Diff to
previous 525
HTML_img mode ("images" mode in the HTML interface) now uses dvipng to
generate images. ProblemSet now has a link to Hardcopy.
-sam
Revision
512 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 23 22:19:51 2002 UTC (10 years, 8 months ago) by
malsyned
File length: 11615 byte(s)
Diff to
previous 508
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
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
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
"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
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, 10 months ago) by
malsyned
File length: 4555 byte(s)
Diff to
previous 397
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
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
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
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)
-
[select for diffs]
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)
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.