version 1.65, 2013/07/09 21:35:06
|
version 1.67, 2015/09/11 20:12:30
|
Line 393 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 427 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 437 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 466 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; |