version 1.7, 2005/11/08 17:58:35
|
version 1.8, 2006/04/06 19:31:03
|
Line 347 sub jscript_three {
|
Line 347 sub jscript_three {
|
if (exists($env{'form.go'}) ) { |
if (exists($env{'form.go'}) ) { |
$source = $env{'form.go'}; |
$source = $env{'form.go'}; |
} |
} |
|
|
|
my $start_page = |
|
&Apache::loncommon::start_page('Create IMS import directory',undef, |
|
{'only_body' => 1, |
|
'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'", |
|
'js_ready' => 1,}); |
|
my $end_page = |
|
&Apache::loncommon::end_page({'js_ready' => 1,}); |
$$jsref = <<"END_OF_ONE"; |
$$jsref = <<"END_OF_ONE"; |
function verify() { |
function verify() { |
if ((document.forms.dataForm.newdir.value == '') || (!document.forms.dataForm.newdir.value)) { |
if ((document.forms.dataForm.newdir.value == '') || (!document.forms.dataForm.newdir.value)) { |
Line 371 function createWin() {
|
Line 379 function createWin() {
|
document.dataForm.newdir.value = ""; |
document.dataForm.newdir.value = ""; |
newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes") |
newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes") |
newWindow.document.open() |
newWindow.document.open() |
newWindow.document.write("<html><head><title>Create Testbank directory</title><meta http-equiv='pragma' content='no-cache'>\\n") |
newWindow.document.write('$start_page') |
newWindow.document.write("</head><body bgcolor='#CCFFDD' topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'>\\n") |
|
newWindow.document.write("<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n") |
newWindow.document.write("<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n") |
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='430' bgcolor='#CCFFDD'>\\n") |
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='430' bgcolor='#CCFFDD'>\\n") |
newWindow.document.write("<tr><td width='2'> </td><td width='3'> </td>\\n") |
newWindow.document.write("<tr><td width='2'> </td><td width='3'> </td>\\n") |
Line 386 function createWin() {
|
Line 393 function createWin() {
|
newWindow.document.write("$fullpath<input type='text' name='newfilename' value=''/>") |
newWindow.document.write("$fullpath<input type='text' name='newfilename' value=''/>") |
newWindow.document.write("<input type='button' value='Go' onClick='document.fileaction.submit();' />") |
newWindow.document.write("<input type='button' value='Go' onClick='document.fileaction.submit();' />") |
newWindow.document.write("</td></tr>\\n") |
newWindow.document.write("</td></tr>\\n") |
newWindow.document.write("</table></body></html>") |
newWindow.document.write("</table>") |
|
newWindow.document.write('$end_page') |
newWindow.document.close() |
newWindow.document.close() |
newWindow.focus() |
newWindow.focus() |
} |
} |
Line 1340 END_OF_BLOCK
|
Line 1348 END_OF_BLOCK
|
</tr> |
</tr> |
</table> |
</table> |
</form> |
</form> |
</body> |
|
</html> |
|
END_OF_FAIL |
END_OF_FAIL |
return; |
return; |
} |
} |
Line 1775 sub handler {
|
Line 1781 sub handler {
|
} elsif ($page_name eq 'Confirmation') { |
} elsif ($page_name eq 'Confirmation') { |
&jscript_four(\$javascript,$fullpath); |
&jscript_four(\$javascript,$fullpath); |
} |
} |
} |
} |
|
|
|
$javascript = "<script type=\"text/javascript\">\n//<!--\n". |
|
$javascript."\n// --></script>\n"; |
|
|
|
$r->print(&Apache::loncommon::start_page('Upload testbank questions to Construction Space', |
|
$javascript, |
|
{'add_entries' => $loadentries})); |
|
|
$r->print("<html><head><title>LON-CAPA Construction Space</title><script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n</head>"); |
|
|
|
$r->print(&Apache::loncommon::bodytag('Upload testbank questions to Construction Space',undef,$loadentries)); |
|
|
|
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
$r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname. |
$r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname. |
&mt(' at ').$udom.'</font></h3>'); |
&mt(' at ').$udom.'</font></h3>'); |
Line 1805 sub handler {
|
Line 1814 sub handler {
|
} else { |
} else { |
&Apache::lonupload::phaseone($r,$fn,$uname,$udom,'testbank'); |
&Apache::lonupload::phaseone($r,$fn,$uname,$udom,'testbank'); |
} |
} |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
1; |
1; |