version 1.233, 2004/02/10 22:11:37
|
version 1.236, 2004/02/16 17:19:36
|
Line 200 sub problem_edit_footer {
|
Line 200 sub problem_edit_footer {
|
<input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" />'; |
<input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" />'; |
} |
} |
|
|
|
sub option { |
|
my ($value,$name) = @_; |
|
my $result ="<option value='".$value."' "; |
|
if ($ENV{'form.'.$name} eq $value) { |
|
$result.=" selected='on' "; |
|
} |
|
$result.='>'; |
|
return $result; |
|
} |
|
|
sub problem_web_to_edit_header { |
sub problem_web_to_edit_header { |
my ($rndseed)=@_; |
my ($rndseed)=@_; |
my $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" /> |
my $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" /> |
Line 216 sub problem_web_to_edit_header {
|
Line 226 sub problem_web_to_edit_header {
|
$result.= ' />'.&mt(' Show All Foils'). |
$result.= ' />'.&mt(' Show All Foils'). |
&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems'). |
&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems'). |
'<hr />'; |
'<hr />'; |
|
$result.=" |
|
<nobr> |
|
Problem Status: |
|
<select name='problemstate'> |
|
<option name=''></option> |
|
".&option('CLOSED' ,'problemstate').&mt("Closed")."</option> |
|
".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."</option> |
|
".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."</option> |
|
".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."</option> |
|
".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Answer")."</option> |
|
</select> |
|
</nobr> |
|
<nobr> |
|
Problem Type: |
|
<select name='problemtype'> |
|
<option name=''></option> |
|
".&option('exam' ,'problemtype')."Exam Problem</option> |
|
".&option('problem','problemtype')."Homework problem</option> |
|
".&option('survey' ,'problemtype')."Survey Question</option> |
|
</select> |
|
</nobr> |
|
<nobr> |
|
Feedback Mode: |
|
<select name='problemstatus'> |
|
<option value=''></option> |
|
".&option('yes','problemstatus')."Show Feedback</option> |
|
".&option('no', 'problemstatus')."Don\'t Show Feedback</option> |
|
</select> |
|
<input type='submit' name='changeproblemmode' value='Change' /> |
|
</nobr> |
|
<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 297 sub init_problem_globals {
|
Line 338 sub init_problem_globals {
|
@Apache::inputtags::partlist=('0'); |
@Apache::inputtags::partlist=('0'); |
$Apache::lonhomework::problemstatus= |
$Apache::lonhomework::problemstatus= |
&Apache::lonnet::EXT('resource.0.problemstatus'); |
&Apache::lonnet::EXT('resource.0.problemstatus'); |
|
&Apache::lonxml::debug("problem status is $Apache::lonhomework::problemstatus"); |
|
&Apache::lonxml::debug("env probstat is ".$ENV{'form.problemstatus'}); |
|
if ($ENV{'request.state'} eq 'construct' && |
|
defined($ENV{'form.problemstatus'})) { |
|
$Apache::lonhomework::problemstatus=$ENV{'form.problemstatus'}; |
|
} |
} else { |
} else { |
$Apache::inputtags::part=''; |
$Apache::inputtags::part=''; |
@Apache::inputtags::partlist=(); |
@Apache::inputtags::partlist=(); |
Line 1039 sub end_part {
|
Line 1086 sub end_part {
|
sub start_preduedate { |
sub start_preduedate { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { |
|
&Apache::lonxml::debug("State in preduedate is ". $Apache::inputtags::status['-1']); |
if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && |
if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && |
$Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER' && |
$Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') { |
$Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { |
&Apache::lonxml::debug("Wha? ". ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER')); |
&Apache::lonxml::get_all_text("/preduedate",$parser); |
&Apache::lonxml::get_all_text("/preduedate",$parser); |
} |
} |
} |
} |
Line 1054 sub end_preduedate {
|
Line 1102 sub end_preduedate {
|
|
|
sub start_postanswerdate { |
sub start_postanswerdate { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'grade') { |
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { |
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { |
&Apache::lonxml::get_all_text("/postanswerdate",$parser); |
&Apache::lonxml::get_all_text("/postanswerdate",$parser); |
} |
} |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
return '\vskip 0 mm \noindent'; |
&Apache::lonxml::get_all_text("/postanswerdate",$parser); |
} |
} |
return ''; |
return ''; |
} |
} |