HomeCurrent UR
|
NAMEWeBWorK::PG - Invoke one of several PG rendering methods using an easy-to-use API.
SYNOPSIS
$pg = WeBWorK::PG->new(
$ce, # a WeBWorK::CourseEnvironment object
$user, # a WeBWorK::DB::Record::User object
$sessionKey,
$set, # a WeBWorK::DB::Record::UserSet object
$problem, # a WeBWorK::DB::Record::UserProblem object
$psvn,
$formFields # in &WeBWorK::Form::Vars format
{ # translation options
displayMode => "images", # (plainText|formattedText|images)
showHints => 1, # (0|1)
showSolutions => 0, # (0|1)
refreshMath2img => 0, # (0|1)
processAnswers => 1, # (0|1)
},
);
$translator = $pg->{translator}; # WeBWorK::PG::Translator
$body = $pg->{body_text}; # text string
$header = $pg->{head_text}; # text string
$answerHash = $pg->{answers}; # WeBWorK::PG::AnswerHash
$result = $pg->{result}; # hash reference
$state = $pg->{state}; # hash reference
$errors = $pg->{errors}; # text string
$warnings = $pg->{warnings}; # text string
$flags = $pg->{flags}; # hash reference
DESCRIPTIONWeBWorK::PG is a factory for modules which use the WeBWorK::PG API. Notable modules which use this API (and exist) are WeBWorK::PG::Local and WeBWorK::PG::Remote. The course environment key $pg{renderer} is consulted to determine which render to use.
THE WEBWORK::PG APIModules which support this API must implement the following method:
Parameters
RETURN VALUEThe
METHODS PROVIDED BY THE BASE CLASSThe following methods are provided for use by subclasses of WeBWorK::PG.
AUTHORWritten by Sam Hathaway, sh002i (at) math.rochester.edu. File path = /ww/webwork/webwork2/lib/WeBWorK/PG.pm
|
||
Last update: Wednesday, January 10, 2007 at 10:02:31 PM.
This site maintained using Manila and Frontier software. |
|||