version 1.64, 2013/07/03 05:03:19
|
version 1.67, 2015/09/11 20:12:30
|
Line 201 sub phaseone {
|
Line 201 sub phaseone {
|
return; |
return; |
} |
} |
$filesize = int($filesize/1000); #expressed in kb |
$filesize = int($filesize/1000); #expressed in kb |
my $authorspace = $Apache::lonnet::perlvar{'lonDocRoot'}."/priv/$udom/$uname"; |
my $output = &Apache::loncommon::excess_filesize_warning($uname,$udom,'author', |
my $output = &Apache::loncommon::excess_filesize_authorspace($uname,$udom,$authorspace, |
$env{'form.upfile.filename'},$filesize,'upload'); |
$env{'form.upfile.filename'},$filesize,'upload'); |
|
if ($output) { |
if ($output) { |
$r->print($output.&earlyout($fn,$uname,$udom)); |
$r->print($output.&earlyout($fn,$uname,$udom)); |
return; |
return; |
Line 394 sub check_extension {
|
Line 393 sub check_extension {
|
if ($pathchg) { |
if ($pathchg) { |
if ($mode eq 'testbank') { |
if ($mode eq 'testbank') { |
$returnflag = 'embedded'; |
$returnflag = 'embedded'; |
$result .= '<p>'.&mt('Or [_1]continue[_2] the testbank import without modifying the references(s).','<a href="javascript:document.testbankForm.submit();">','</a>').'</p>'; |
$result .= '<p>'.&mt('Or [_1]continue[_2] the testbank import without modifying the reference(s).','<a href="javascript:document.testbankForm.submit();">','</a>').'</p>'; |
} |
} |
} |
} |
} |
} |
Line 428 sub phasethree {
|
Line 427 sub phasethree {
|
my $dir_root = $r->dir_config('lonDocRoot').$url_root; |
my $dir_root = $r->dir_config('lonDocRoot').$url_root; |
my $path = &File::Basename::dirname($fn); |
my $path = &File::Basename::dirname($fn); |
$path =~ s{^\Q$url_root\E}{}; |
$path =~ s{^\Q$url_root\E}{}; |
|
my $dirpath = $url_root.$path.'/'; |
|
$dirpath=~s{/+}{/}g; |
my $filename = &HTML::Entities::encode($env{'form.filename'},'<>&"'); |
my $filename = &HTML::Entities::encode($env{'form.filename'},'<>&"'); |
my $state = &embedded_form_elems('modify_orightml',$filename,$mode). |
my $state = &embedded_form_elems('modify_orightml',$filename,$mode). |
'<input type="hidden" name="phase" value="four" />'; |
'<input type="hidden" name="phase" value="four" />'; |
Line 438 sub phasethree {
|
Line 439 sub phasethree {
|
if ($mode ne 'imsimport' && $mode ne 'testbank') { |
if ($mode ne 'imsimport' && $mode ne 'testbank') { |
$result .= '<br /><h3><a href="'.$fn.'">'. |
$result .= '<br /><h3><a href="'.$fn.'">'. |
&mt('View main file').'</a></h3>'. |
&mt('View main file').'</a></h3>'. |
'<h3><a href="'.$url_root.$path.'">'. |
'<h3><a href="'.$dirpath.'">'. |
&mt('Back to Directory').'</a></h3><br />'; |
&mt('Back to Directory').'</a></h3><br />'; |
} |
} |
return ($result,$returnflag); |
return ($result,$returnflag); |
Line 467 sub phasefour {
|
Line 468 sub phasefour {
|
my $dir_root = $r->dir_config('lonDocRoot').$url_root; |
my $dir_root = $r->dir_config('lonDocRoot').$url_root; |
my $path = &File::Basename::dirname($fn); |
my $path = &File::Basename::dirname($fn); |
$path =~ s{^\Q$url_root\E}{}; |
$path =~ s{^\Q$url_root\E}{}; |
|
my $dirpath = $url_root.$path.'/'; |
|
$dirpath=~s{/+}{/}g; |
my $outcome = |
my $outcome = |
&Apache::loncommon::modify_html_refs($mode,$path,$uname,$udom,$dir_root); |
&Apache::loncommon::modify_html_refs($mode,$path,$uname,$udom,$dir_root); |
$result .= $outcome; |
$result .= $outcome; |
if ($mode ne 'imsimport' && $mode ne 'testbank') { |
if ($mode ne 'imsimport' && $mode ne 'testbank') { |
$result .= '<br /><h3><a href="'.$fn.'">'. |
$result .= '<br /><h3><a href="'.$fn.'">'. |
&mt('View main file').'</a></h3>'. |
&mt('View main file').'</a></h3>'. |
'<h3><a href="'.$url_root.$path.'">'. |
'<h3><a href="'.$dirpath.'">'. |
&mt('Back to Directory').'</a></h3><br />'; |
&mt('Back to Directory').'</a></h3><br />'; |
} |
} |
return $result; |
return $result; |