version 1.113, 2010/12/31 02:40:14
|
version 1.114, 2011/01/29 19:41:41
|
Line 58 sub start_essayresponse {
|
Line 58 sub start_essayresponse {
|
if (!defined($maxfilesize)) { |
if (!defined($maxfilesize)) { |
$maxfilesize = 10.0; #FIXME This should become a domain configuration |
$maxfilesize = 10.0; #FIXME This should become a domain configuration |
} |
} |
|
my $hiddendraft; |
if (($Apache::lonhomework::type eq 'survey') || |
if (($Apache::lonhomework::type eq 'survey') || |
($Apache::lonhomework::type eq 'surveycred') || |
($Apache::lonhomework::type eq 'surveycred') || |
($Apache::lonhomework::type eq 'anonsurvey') || |
($Apache::lonhomework::type eq 'anonsurvey') || |
($Apache::lonhomework::type eq 'anonsurveycred')) { |
($Apache::lonhomework::type eq 'anonsurveycred')) { |
$result.= '<input type="hidden" name="HWDRAFT'.$part.'_'.$id.'" value="yes" />'; |
$hiddendraft = '<input type="hidden" name="HWDRAFT'.$part.'_'.$id.'" value="yes" />'; |
} |
} else { |
my $status_text = &mt('Submission type'); |
my $status_text = &mt('Submission type'); |
if ($Apache::lonhomework::history{"resource.$part.award"} eq 'DRAFT') { |
if ($Apache::lonhomework::history{"resource.$part.award"} eq 'DRAFT') { |
$status_text .= '<br />'.&mt('(Currently -- draft)'); |
$status_text .= '<br />'.&mt('(Currently -- draft)'); |
} |
} |
$result.= '<div>'.&Apache::lonhtmlcommon::start_pick_box(). |
$result = &Apache::lonhtmlcommon::row_title($status_text); |
&Apache::lonhtmlcommon::row_title($status_text); |
|
if (($Apache::lonhomework::type ne 'survey') && |
|
($Apache::lonhomework::type ne 'surveycred') && |
|
($Apache::lonhomework::type ne 'anonsurvey') && |
|
($Apache::lonhomework::type ne 'anonsurveycred')) { |
|
my $closure; |
my $closure; |
unless ($ncol || $uploadedfiletypes) { |
unless ($ncol || $uploadedfiletypes) { |
$closure = 1; |
$closure = 1; |
Line 111 sub start_essayresponse {
|
Line 107 sub start_essayresponse {
|
} |
} |
$result.=&Apache::inputtags::file_selector($part,$id,$uploadedfiletypes, |
$result.=&Apache::inputtags::file_selector($part,$id,$uploadedfiletypes, |
$filesfrom,undef,$maxfilesize); |
$filesfrom,undef,$maxfilesize); |
$result.=&Apache::lonhtmlcommon::end_pick_box().'</div>'; |
if ($result) { |
|
$result = |
|
'<div>'.$hiddendraft. |
|
&Apache::lonhtmlcommon::start_pick_box(). |
|
$result. |
|
&Apache::lonhtmlcommon::end_pick_box().'</div>'; |
|
} else { |
|
$result = $hiddendraft; |
|
} |
} elsif ($target eq 'web' && |
} elsif ($target eq 'web' && |
$Apache::inputtags::status[-1] ne 'CAN_ANSWER') { |
$Apache::inputtags::status[-1] ne 'CAN_ANSWER') { |
my $part= $Apache::inputtags::part; |
my $part= $Apache::inputtags::part; |