version 1.121, 2002/10/01 21:04:34
|
version 1.129, 2002/10/28 14:47:22
|
Line 163 sub problem_web_to_edit_header {
|
Line 163 sub problem_web_to_edit_header {
|
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; } |
$result.= ' /> Show All Foils |
$result.= ' /> Show All Foils |
<hr />'; |
<hr />'; |
|
my $numtoanalyze=$ENV{'form.numtoanalyze'}; |
|
if (!$numtoanalyze) { $numtoanalyze=100; } |
|
#DISABLED for now. |
|
#$result.= '<input type="submit" name="problemmode" value="Answer Distribution" /> |
|
# <input type="text" name="numtoanalyze" value="'. |
|
# $numtoanalyze.'" size="5" /> <hr />'; |
|
return $result; |
} |
} |
|
|
sub initialize_storage { |
sub initialize_storage { |
Line 389 sub end_problem {
|
Line 396 sub end_problem {
|
$status ne 'UNCHECKEDOUT') { |
$status ne 'UNCHECKEDOUT') { |
# if part is zero, no <part>s existed, so we need show the current |
# if part is zero, no <part>s existed, so we need show the current |
# grading status |
# grading status |
my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part); |
my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target); |
#FIXME this is ugly we should just generate tex in inputtags |
|
if ($target eq 'tex') { $gradestatus=&html_to_tex($gradestatus); } |
|
if ($Apache::lonhomework::type ne 'exam') {$result.= $gradestatus;} |
if ($Apache::lonhomework::type ne 'exam') {$result.= $gradestatus;} |
} |
} |
if ( |
if ( |
Line 478 sub end_library {
|
Line 483 sub end_library {
|
sub start_block { |
sub start_block { |
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' || $target eq 'analyze') { |
my $code = @$parstack[$#$parstack]; |
my $code = @$parstack[$#$parstack]; |
$code =~ s/\"//g; |
$code =~ s/\"//g; |
$code .=';return $condition;'; |
$code .=';return $condition;'; |
Line 535 sub start_randomlist {
|
Line 540 sub start_randomlist {
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my $result; |
my $result; |
if ($target eq 'answer' || $target eq 'grade' || $target eq 'web' || |
if ($target eq 'answer' || $target eq 'grade' || $target eq 'web' || |
$target eq 'tex') { |
$target eq 'tex' || $target eq 'analyze') { |
my $body= &Apache::lonxml::get_all_text("/randomlist",$$parser[$#$parser]); |
my $body= &Apache::lonxml::get_all_text("/randomlist",$$parser[$#$parser]); |
my $b_parser= HTML::TokeParser->new(\$body); |
my $b_parser= HTML::TokeParser->new(\$body); |
my $b_tok; |
my $b_tok; |
Line 625 sub start_part {
|
Line 630 sub start_part {
|
if ( $target eq "web" ) { |
if ( $target eq "web" ) { |
$result="<br />Part is not open to be viewed. It $accessmsg<br />"; |
$result="<br />Part is not open to be viewed. It $accessmsg<br />"; |
} elsif ( $target eq 'tex' ) { |
} elsif ( $target eq 'tex' ) { |
$result="\\vskip 0 mm Part is not open to be viewed. It $accessmsg \\\\"; |
$result="\\end{minipage}\\vskip 0 mm Part is not open to be viewed. It $accessmsg \\\\\\begin{minipage}{\\textwidth}"; |
} |
} |
} else { |
} else { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
$result='\vskip 0 mm'; |
if ($$tagstack[-2] ne 'problem') { |
|
$result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; |
|
} |
} |
} |
} |
} |
} |
} |