version 1.22, 2003/01/24 19:49:48
|
version 1.26, 2003/04/08 02:40:56
|
Line 74 sub start_essayresponse {
|
Line 74 sub start_essayresponse {
|
"'multipart/form-data'".';" /><br />Allowed filetypes: <b>'.$uploadedfiletypes.'</b><br />'; |
"'multipart/form-data'".';" /><br />Allowed filetypes: <b>'.$uploadedfiletypes.'</b><br />'; |
if ($uploadedfile) { |
if ($uploadedfile) { |
$result.='Currently submitted: <tt><a href="'. |
$result.='Currently submitted: <tt><a href="'. |
&Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).'">'.$uploadedfile.'</a></tt>'; |
&Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).'"><img src="/adm/lonIcons/unknown.gif" border=0"> '.$uploadedfile.'</a></tt>'; |
} else { |
} else { |
$result.='(Hand in a file you have prepared on your computer)'; |
$result.='(Hand in a file you have prepared on your computer)'; |
} |
} |
Line 98 sub end_essayresponse {
|
Line 98 sub end_essayresponse {
|
if ($collaborators ne $previous_list); |
if ($collaborators ne $previous_list); |
} |
} |
if ( defined $ENV{'form.submitted'}) { |
if ( defined $ENV{'form.submitted'}) { |
my $response = $ENV{'form.HWVAL'.$id}; |
my $response = $ENV{'form.HWVAL_'.$id}; |
my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'}; |
my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'}; |
if (( $response =~ /[^\s]/) || ($filename =~ /[^\s]/)) { |
if (( $response =~ /[^\s]/) || ($filename =~ /[^\s]/)) { |
my $award; |
my $award; |
Line 132 sub end_essayresponse {
|
Line 132 sub end_essayresponse {
|
$result.=&Apache::edit::end_table(); |
$result.=&Apache::edit::end_table(); |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$result.='\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm'; |
my $id = $Apache::inputtags::part; |
&Apache::lonxml::increment_counter(); |
my $weight = &Apache::lonnet::EXT("resource.$id.weight"); |
$result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Leave blank on scoring form}\vskip 0 mm \end{enumerate}'; |
my $repetition = int $weight/9; |
&Apache::lonxml::increment_counter(); |
if ($weight % 9 != 0) {$repetition++;} |
|
$result.='\begin{enumerate}'; |
|
for (my $i=0;$i<$repetition;$i++) { |
|
$result.='\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Leave blank on scoring form}\vskip 0 mm'; |
|
&Apache::lonxml::increment_counter(); |
|
} |
|
$result.= '\end{enumerate}'; |
} |
} |
} |
} |
|
|