Log of /branches/rel-2-2-dev/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
Parent Directory
Revision
4052 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 17 21:18:58 2006 UTC (7 years, 2 months ago) by
sh002i
File length: 45984 byte(s)
Diff to
previous 4037
,
to
selected 1016
backport: Resolve bug #994 ("Try it" yields: sourceFilePath is unsafe!)
SetMaker uses a relative path for sourceFilePath, which is nice, but
which path_is_subdir didn't account for. Added thrid argument,
$allow_relative, to that utility which causes $dir to be prepended to
$path. Modified Problem.pm to trigger this behavior.
Revision
4014 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 7 21:02:00 2006 UTC (7 years, 4 months ago) by
sh002i
File length: 45887 byte(s)
Diff to
previous 4013
,
to
selected 1016
security checks for sourceFilePath -- fixes bug #970.
* Utils.pm: add path_is_subdir
* Problem.pm: use path_is_subdir to check sourceFilePath
fix logic on when to use sourceFilePath
* ProblemSet.pm: use path_is_subdir to check sourceFilePath
add permissions check around sourceFilePath handler
* ProblemSets.pm: use path_is_subdir to check sourceFilePath
* GatewayQuiz.pm: remove code to preserve editMode/sourceFilePath (not used)
Revision
3972 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 25 23:12:05 2006 UTC (7 years, 4 months ago) by
sh002i
File length: 45669 byte(s)
Diff to
previous 3962
,
to
selected 1016
update copyright date range -- 2000-2006. this is probably overkill,
since there are some files that were created after 2000 and some files
that were last modified before 2006.
Revision
3391 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 20 18:14:58 2005 UTC (7 years, 11 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 43975 byte(s)
Diff to
previous 3377
,
to
selected 1016
Changes to the reports of a problem status. This closes bug #631. It
also reports blank errors differently from incorrect answers to support
sequential problem graders. Finally it adds a "state_summary_msg" field
to the problem state which can be used to completely replace the
report on the current problem state usually printed at the bottom of a
problem page.
Revision
3377 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 14 13:15:27 2005 UTC (7 years, 11 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 43121 byte(s)
Diff to
previous 3362
,
to
selected 1016
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
3000 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 18 16:00:37 2004 UTC (8 years, 7 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 42550 byte(s)
Diff to
previous 2998
,
to
selected 1016
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.
Revision
2735 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Sep 5 00:54:31 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 43935 byte(s)
Diff to
previous 2685
,
to
selected 1016
Modified ShowAnswers.pm so that the individual answsers are colored coded to
indicate whether they are correct or not. I also added a permission
level called "dont_log_past_answers" that is true for professors (so
the answer log won't be cluttered up with professors answers, which we
don't really care about seeing).
While I was at it, I converted ShowAnswers.pm to use the CGI package
rather than explicit HTML.
Revision
2685 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 26 01:34:30 2004 UTC (8 years, 9 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 43781 byte(s)
Diff to
previous 2635
,
to
selected 1016
Fixed logic for the check/submit buttons. Previously, if a student had 1
attempt remaining, they only got a check button. The problem was that
can{recordAnswers} was used for both deciding record/submit and for whether
or not to produce the Submit button. On the last submission, these are
different. So, this adds a new field to can/must/will so that one field
says whether we can record the current attempt, and another says if we
can generate a Submit button.
Revision
1663 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 9 01:12:32 2003 UTC (9 years, 6 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 36433 byte(s)
Diff to
previous 1636
,
to
selected 1016
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
1591 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 18 20:46:01 2003 UTC (9 years, 8 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 34815 byte(s)
Diff to
previous 1582
,
to
selected 1016
Fixed problem in logic which kept an edited problem from reading the
.tmp file when the answer was submitted. Now the editMode variable
and sourceFilePath variables are passed on as hidden variables by
Problem.pm if they exists in the input form. This fixes bug #179
as well as bug #109.
The temporary file is now labeled fileName.pg.user.tmp where user is
the login name of the person editing the file. If that file exists
then pgProblemEditor will attempt to use that as a source file.
The revert button forces a read from fileName.pg
--Mike
Revision
1539 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Sep 27 16:44:53 2003 UTC (9 years, 8 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 34335 byte(s)
Diff to
previous 1536
,
to
selected 1016
When recording answers the answer strings are now obtained directly from the original
formField entries, rather than from the processed version in the answer hashes.
This insures that the memorized answers will be identical with the ones that would
have been submitted from the form.
This is important for answers with multiple values which are represented by
null separated strings. The answer evaluation process converts these strings
to references to arrays, and -- in order to have good display properties -- the
original_student_answer slot in the AnswerHash contains a representation such as
( 4, 5, 6).
This is NOT suitable for resubmitting as an answer in a form field and is therefore not the
right thing to store in the data base when saving answers.
--MIke
Revision
1131 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 11 20:40:11 2003 UTC (10 years ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 29416 byte(s)
Diff to
previous 1128
,
to
selected 1016
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
1007 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 4 03:04:07 2003 UTC (10 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 29394 byte(s)
Diff to
previous 1000
,
to
selected 1016
Added a section to handle the case where the problem has not yet been
assigned to a user. This might occur when the problem template is
called form the problem editor before the sets have been assigned
to students. The problem is obtained as a global problem
then converted to a user_problem with default values. The problem
is not saved. This code should be reviewed to make sure there are no
hidden behaviors. Perhaps a group reading is in order once things
settle down. This squashes bug #34.
--Mike
Revision
993 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 3 20:20:16 2003 UTC (10 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 27629 byte(s)
Diff to
previous 992
,
to
selected 1016
Made small modifications to allow Problem.pm to read a problem that has
not yet been assigned.
TO DO (and I'll need help with this)
Convert a global set to a global user set (and the global problem to a
global user problem). I need to know how to specify the appropriate
classes.
Once we are guaranteed a record of the type returned by getGlobalUser
....
stuff missing defaults (e.g. psvn for set, and num_correct (answers) for
problem) in the newly created global_user record objects.(this part I
can do.)
At that point the rest of Problem.pm should be able to proceed as before
without any changes.
--Mike
Revision
942 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 29 20:30:56 2003 UTC (10 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 26503 byte(s)
Diff to
previous 940
,
to
selected 1016
Display options are now sticky (they are repeated as hidden options in the main problem body).
Changed name of submit button from redisplay to "save options"
fixes bug #27 at least to some extent.
these saved options may not persist from one problem to another. In order to solve that problem
we need a storage place for user options, or else many more hidden inputs to save state as one
moves from one request to another.
this fix will work for now.
-- Mike
Revision
940 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 29 20:02:35 2003 UTC (10 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 25964 byte(s)
Diff to
previous 939
,
to
selected 1016
Added a new template hook "options" which allows one to reset the display options.
Modified viewOptions to conform to a "vertical" look for the radio buttons in the redisplay options.
Modified some of the labels for the same reason.
The horizontal spacing is a bit of kludge (I can't guarantee no line breaks for each of the radio button
labels). Using underbars instead of spaces in the labels would fix this, but...
--Mike
Revision
926 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 28 03:31:07 2003 UTC (10 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 25390 byte(s)
Diff to
previous 920
,
to
selected 1016
Problem Editor now creates a temporary file to edit (
adding .tmp to the file name)
Refresh causes a redirect to the Problem.pm with a GET command.
Some of the arguments are unnecessary and need to be cleaned up.
The seed and display mode in the problem editor are not properly
initialized from the problem set.
Problem.pm has been modified to check for these arguments and to read
the temporary source file, seed and displayMode. These are passed
through to a PG.pm object.
PG also needed to be modified so that the source_file and seed values
are overridden.
Revision
692 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 7 21:19:38 2003 UTC (10 years, 5 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 20484 byte(s)
Diff to
previous 685
,
to
selected 1016
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
562 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 27 23:53:42 2002 UTC (10 years, 8 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 16891 byte(s)
Diff to
previous 558
,
to
selected 1016
- 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
455 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 5 21:34:18 2002 UTC (10 years, 10 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 13658 byte(s)
Diff to
previous 449
,
to
selected 1016
"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
434 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 19 06:19:34 2002 UTC (10 years, 11 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 12471 byte(s)
Diff to
previous 431
,
to
selected 1016
added refreshMath2img to the problem environment (PG.pm) and modified
Problem.pm to set it when showHints or showSolutions is on. THIS IS NOT
THE BEST THING TO DO -- we only need to refresh when the value of
showHints or showSolutions CHANGES. Also, we should be refreshing if the
problem seed changes. So, we need somewhere to store those three values
between invocations of the script. HHHHHMMMMMMMM......... &math2img in
dangerousMacros.pl has been modified to respect refreshMath2img and also
refresh if the image file is older than the PG source file.
-sam
Revision
392 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 20 13:46:05 2002 UTC (11 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm
File length: 24881 byte(s)
Diff to
previous 388
,
to
selected 1016
Problem.pm now works (kindof) to serve PG problems. There are configuration
variables at the top that have to be customized to an individuals directory.
(They could be placed in a config file to avoid having to update them constantly,
but soon these values should be set by information from the course and
problem environments.)
The code is still rather delicate. It seems to work with some problems and not
with others. I suspect that the macro files are not being properly read in
and that perhaps the warning mechanisms are not yet working properly.
Also beware the line ending problem. Some of these files were created on a
mac (using unix). I've had completely mysterious errors that were fixed
by checking the line endings.
There is also a lot of code, particulary the error reporting code which should be put
in its own module.
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.