version 1.46.6.1, 2009/10/07 21:09:21
|
version 1.47, 2009/07/06 10:19:22
|
Line 191 sub phaseone {
|
Line 191 sub phaseone {
|
'<br />'. |
'<br />'. |
'<br />'.&mt('Choose file type:').' |
'<br />'.&mt('Choose file type:').' |
<select name="filetype"> |
<select name="filetype"> |
<option value="standard" selected="selected">'.&mt('Regular file').'</option> |
<option value="standard" selected="selected">'.&mt('Regular file').' |
<option value="testbank">'.&mt('Testbank file').'</option> |
<option value="testbank">'.&mt('Testbank file').' |
<option value="imsimport">'.&mt('IMS package').'</option> |
<option value="imsimport">'.&mt('IMS package').' |
</select>'.&Apache::loncommon::help_open_topic("Uploading_File_Options").' |
</select>'.&Apache::loncommon::help_open_topic("Uploading_File_Options").' |
<br /> |
<br /> |
<br /> |
<br /> |
'); |
'); |
$r->print('<input type="button" value="'.&mt('Upload').'" onclick="javascript:verifyForm()"/></form>'); |
$r->print('<input type="button" value="'.&mt('Upload').'" onClick="javascript:verifyForm()"/></form>'); |
# Check for bad extension and warn user |
# Check for bad extension and warn user |
if ($fn=~/\.(\w+)$/ && |
if ($fn=~/\.(\w+)$/ && |
(&Apache::loncommon::fileembstyle($1) eq 'hdn')) { |
(&Apache::loncommon::fileembstyle($1) eq 'hdn')) { |
Line 440 function verifyForm() {
|
Line 440 function verifyForm() {
|
$javascript = "<script type=\"text/javascript\">\n//<!--\n". |
$javascript = "<script type=\"text/javascript\">\n//<!--\n". |
$javascript."\n// --></script>\n"; |
$javascript."\n// --></script>\n"; |
|
|
|
# Breadcrumbs |
|
my $brcrum = [{'href' => &Apache::loncommon::authorspace(), |
|
'text' => 'Construction Space'}, |
|
{'href' => '/adm/upload', |
|
'text' => 'Upload file to Construction Space'}]; |
$r->print(&Apache::loncommon::start_page('Upload file to Construction Space', |
$r->print(&Apache::loncommon::start_page('Upload file to Construction Space', |
$javascript)); |
$javascript, |
|
{'bread_crumbs' => $brcrum,}) |
|
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader()) |
|
); |
|
|
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
$r->print('<p class="LC_warning">' |
$r->print('<p class="LC_warning">' |