version 1.226, 2003/11/21 20:21:20
|
version 1.228, 2004/01/14 22:47:46
|
Line 186 sub problem_edit_header {
|
Line 186 sub problem_edit_header {
|
<input type="submit" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="submit" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="submit" name="Undo" value="'.&mt('undo').'" /> <hr /> |
<input type="submit" name="Undo" value="'.&mt('undo').'" /> <hr /> |
<input type="submit" name="submit" value="'.&mt('Submit Changes and Edit').'" /> |
<input type="submit" name="submit" value="'.&mt('Submit Changes and Edit').'" /> |
<input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" /><br /><p> </p><table border="0"><tr><td bgcolor="#DDDDDD"> |
<input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" /><br />'. |
'; |
&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index','Problem Editing Help'). |
|
'<table border="0"><tr><td bgcolor="#DDDDDD">'; |
} |
} |
|
|
sub problem_edit_footer { |
sub problem_edit_footer { |
Line 208 sub problem_web_to_edit_header {
|
Line 209 sub problem_web_to_edit_header {
|
onChange="javascript:document.lonhomework.changerandseed.click()" /></nobr> |
onChange="javascript:document.lonhomework.changerandseed.click()" /></nobr> |
<input type="checkbox" name="showallfoils" '; |
<input type="checkbox" name="showallfoils" '; |
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
$result.= ' />'.&mt(' Show All Foils').' |
$result.= ' />'.&mt(' Show All Foils'). |
<hr />'; |
&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems'). |
|
'<hr />'; |
my $numtoanalyze=$ENV{'form.numtoanalyze'}; |
my $numtoanalyze=$ENV{'form.numtoanalyze'}; |
if (!$numtoanalyze) { $numtoanalyze=20; } |
if (!$numtoanalyze) { $numtoanalyze=20; } |
$result.= '<input type="submit" name="problemmode" value='. |
$result.= '<input type="submit" name="problemmode" value='. |
Line 429 sub start_problem {
|
Line 431 sub start_problem {
|
} |
} |
} elsif ($target eq 'web') { |
} elsif ($target eq 'web') { |
my $name= &get_resource_name($parstack,$safeeval); |
my $name= &get_resource_name($parstack,$safeeval); |
if ($status eq 'CAN_ANSWER') { |
$result.="$head_tag_start<title>$name</title></head> |
# create a page header and exit |
|
$result.="$head_tag_start<title>$name</title></head> |
|
$body_tag_start \n $form_tag_start". |
$body_tag_start \n $form_tag_start". |
'<input type="hidden" name="submitted" value="yes" />'; |
'<input type="hidden" name="submitted" value="yes" />'; |
if ($ENV{'request.state'} eq "construct") { |
# create a page header and exit |
$result.= &problem_web_to_edit_header($ENV{'form.rndseed'}); |
if ($ENV{'request.state'} eq "construct") { |
} |
$result.= &problem_web_to_edit_header($ENV{'form.rndseed'}); |
# if we are viewing someone else preserve that info |
} |
if (defined $ENV{'form.grade_symb'}) { |
# if we are viewing someone else preserve that info |
foreach my $field ('symb','courseid','domain','username') { |
if (defined $ENV{'form.grade_symb'}) { |
$result .= '<input type="hidden" name="grade_'.$field. |
foreach my $field ('symb','courseid','domain','username') { |
'" value="'.$ENV{"form.grade_$field"}.'" />'."\n"; |
$result .= '<input type="hidden" name="grade_'.$field. |
} |
'" value="'.$ENV{"form.grade_$field"}.'" />'."\n"; |
} |
} |
} elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' |
|
|| $status eq 'CLOSED' || $status eq 'UNAVALAILABLE' || |
|
$status eq 'INVALID_ACCESS') { |
|
$result.=$head_tag_start. |
|
"<title>$name</title></head>\n$body_tag_start\n"; |
|
} |
} |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $startminipage = ''; |
my $startminipage = ''; |
Line 539 sub end_problem {
|
Line 534 sub end_problem {
|
(($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || |
(($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || |
($target eq 'answer') || ($target eq 'tex') |
($target eq 'answer') || ($target eq 'tex') |
) { |
) { |
if ($status eq 'CAN_ANSWER') { |
if ($target ne 'tex' && |
if ($target ne 'tex' && |
$ENV{'form.answer_output_mode'} ne 'tex') { |
$ENV{'form.answer_output_mode'} ne 'tex') { |
$result.="</form></body>\n"; |
$result.="</form></body>\n"; |
|
} |
|
} elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' || |
|
$status eq 'UNCHECKEDOUT' || $status eq 'INVALID_ACCESS') { |
|
if ($target ne 'tex' && |
|
$ENV{'form.answer_output_mode'} ne 'tex') { |
|
$result.="</body>\n"; |
|
} |
|
} |
} |
if ($target eq 'web') { |
if ($target eq 'web') { |
$result.=&Apache::lonxml::xmlend(); |
$result.=&Apache::lonxml::xmlend(); |