version 1.28, 2012/04/21 02:48:24
|
version 1.31, 2013/06/07 16:07:46
|
Line 52 sub make_link {
|
Line 52 sub make_link {
|
sub stage_2 { |
sub stage_2 { |
my ($r, $filename, $listname) = @_; |
my ($r, $filename, $listname) = @_; |
my ($author)=($filename=~/\/res\/[^\/]+\/([^\/]+)\//); |
my ($author)=($filename=~/\/res\/[^\/]+\/([^\/]+)\//); |
$r->print(&Apache::loncommon::start_page('Copy Problem Source Code to Construction Space') |
$r->print(&Apache::loncommon::start_page('Copy Problem Source Code to Authoring Space') |
.&mt('Please enter the directory that you would like the source code to go into.') |
.&mt('Please enter the directory that you would like the source code to go into.') |
.'<p>' |
.'<p>' |
.&mt('Note: the path is in reference to the root of your construction space,' |
.&mt('Note: the path is in reference to the root of your Authoring Space,' |
.' and new directories will be automatically created.') |
.' and new directories will be automatically created.') |
.'</p>'); |
.'</p>'); |
$r->print('<form name="copy" action="/adm/source" target="_parent" method="post"> |
$r->print('<form name="copy" action="/adm/source" target="_parent" method="post"> |
Line 98 sub copy_stage {
|
Line 98 sub copy_stage {
|
|
|
#Just checking again for access as we want to make sure that it is really ok now that we have the real path |
#Just checking again for access as we want to make sure that it is really ok now that we have the real path |
|
|
my ($uname,$udom)= &Apache::loncacc::constructaccess($path_to_new_file); |
my ($uname,$udom)= &Apache::lonnet::constructaccess($path_to_new_file); |
|
|
if (!$uname || !$udom) { |
if (!$uname || !$udom) { |
$r->print(&Apache::loncommon::start_page('Not Allowed')); |
$r->print(&Apache::loncommon::start_page('Not Allowed')); |
Line 236 sub print_item {
|
Line 236 sub print_item {
|
<input type="hidden" name="filename" value="'.$filename.'" /> |
<input type="hidden" name="filename" value="'.$filename.'" /> |
<input type="hidden" name="listname" value="'.$listname.'" /> |
<input type="hidden" name="listname" value="'.$listname.'" /> |
<input type="hidden" name="action" value="stage2" /> |
<input type="hidden" name="action" value="stage2" /> |
<input type="submit" value="'.&mt('Copy to Construction Space').'" /> |
<input type="submit" value="'.&mt('Copy to Authoring Space').'" /> |
</form><hr /> |
</form><hr /> |
'); |
'); |
} else { |
} else { |