version 1.108, 2010/06/21 02:15:37
|
version 1.111, 2010/08/28 22:25:07
|
Line 121 sub start_essayresponse {
|
Line 121 sub start_essayresponse {
|
$result .= '<td><i>'.&mt('Collaborated with [_1]',$coll).'</i></td>'; |
$result .= '<td><i>'.&mt('Collaborated with [_1]',$coll).'</i></td>'; |
} |
} |
|
|
my $current_files_display = ¤t_file_submissions($part,$id); |
my $current_files_display = &Apache::inputtags::current_file_submissions($part,$id); |
if ($current_files_display) { |
if ($current_files_display) { |
$result .= '<td><b>'.&mt('Submitted files:').'</b><br />'. |
$result .= '<td><b>'.&mt('Submitted files:').'</b><br />'. |
$current_files_display.'</td>'; |
$current_files_display.'</td>'; |
Line 155 sub end_essayresponse {
|
Line 155 sub end_essayresponse {
|
$increment=&Apache::response::scored_response($part,$id); |
$increment=&Apache::response::scored_response($part,$id); |
} elsif ( &Apache::response::submitted() ) { |
} elsif ( &Apache::response::submitted() ) { |
my $response = $env{'form.HWVAL_'.$id}; |
my $response = $env{'form.HWVAL_'.$id}; |
my $filename = $env{'form.HWFILE'.$part.'_'.$id.'.filename'} || |
my $jspart=$part; |
|
$jspart=~s/\./_/g; |
|
my $filename = $env{'form.HWFILE'.$jspart.'_'.$id.'.filename'} || |
$env{'form.HWFILETOOBIG'.$part.'_'.$id}; |
$env{'form.HWFILETOOBIG'.$part.'_'.$id}; |
my $portfiles = $env{'form.HWPORT'.$part.'_'.$id}; |
my $portfiles = $env{'form.HWPORT'.$jspart.'_'.$id}; |
my @deletions = &Apache::loncommon::get_env_multiple('form.HWFILE'.$part.'_'.$id.'_delete'); |
my @deletions = &Apache::loncommon::get_env_multiple('form.HWFILE'.$jspart.'_'.$id.'_delete'); |
my ($is_submit,$was_draft); |
my ($is_submit,$was_draft); |
if ($env{'form.HWDRAFT'.$part.'_'.$id} eq 'yes') { |
if ($env{'form.HWDRAFT'.$part.'_'.$id} eq 'yes') { |
$is_submit = 1; |
$is_submit = 1; |
Line 331 sub file_submission {
|
Line 333 sub file_submission {
|
} |
} |
} |
} |
} |
} |
if ($env{'form.HWFILETOOBIG'.$jspart.'_'.$id} ne '') { |
if ($env{'form.HWFILETOOBIG'.$part.'_'.$id} ne '') { |
$$award = 'EXCESS_FILESIZE'; |
$$award = 'EXCESS_FILESIZE'; |
} elsif ($env{'form.HWFILE'.$jspart.'_'.$id.'.filename'} ne '') { |
} elsif ($env{'form.HWFILE'.$jspart.'_'.$id.'.filename'} ne '') { |
my $newfile = $env{'form.HWFILE'.$jspart.'_'.$id.'.filename'}; |
my $newfile = $env{'form.HWFILE'.$jspart.'_'.$id.'.filename'}; |
Line 483 sub file_submission {
|
Line 485 sub file_submission {
|
push(@pathitems,$restitle); |
push(@pathitems,$restitle); |
$path .= join('/',@pathitems); |
$path .= join('/',@pathitems); |
my $formelement = 'HWFILE'.$jspart.'_'.$id; |
my $formelement = 'HWFILE'.$jspart.'_'.$id; |
my $fname = $env{'form.'.$formelement.'.filename'}; |
my $fname = &Apache::lonnet::clean_filename($env{'form.'.$formelement.'.filename'}); |
&Apache::lonnet::clean_filename($fname); |
|
my $url = '/uploaded/'.$udom.'/'.$uname.'/'.$prefix.$path.'/'.$fname; |
my $url = '/uploaded/'.$udom.'/'.$uname.'/'.$prefix.$path.'/'.$fname; |
my @stat = &Apache::lonnet::stat_file($url); |
my @stat = &Apache::lonnet::stat_file($url); |
if (@stat && $stat[0] ne 'no_such_dir') { |
if (@stat && $stat[0] ne 'no_such_dir') { |