version 1.12, 2005/10/27 18:19:36
|
version 1.15, 2006/03/23 23:17:46
|
Line 27 use strict;
|
Line 27 use strict;
|
use Apache::Constants qw(:common :http :methods); |
use Apache::Constants qw(:common :http :methods); |
use Apache::loncacc; |
use Apache::loncacc; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::Log(); |
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::imsprocessor; |
use Apache::imsprocessor; |
use HTML::Parser; |
use HTML::Parser; |
Line 39 use File::Basename();
|
Line 38 use File::Basename();
|
# ---------------------------------------------------------------- Jscript One |
# ---------------------------------------------------------------- Jscript One |
sub jscript_one { |
sub jscript_one { |
my ($fullpath,$jsref) = @_; |
my ($fullpath,$jsref) = @_; |
|
|
|
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 62 function createWin() {
|
Line 70 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 IMS import 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("\\n<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='600' bgcolor='#CCFFDD'>\\n") |
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='600' 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") |
newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\n") |
newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\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") |
newWindow.document.write("<td><form name='fileaction' action='/adm/cfile' method='post'>\\n") |
newWindow.document.write("<td><form name='fileaction' action='/adm/cfile' method='post'>\\n") |
newWindow.document.write("<font face='arial,helvetica,sans-serif'>Enter the name of the new directory where you will store the contents of your IMS package.<br /><br />") |
newWindow.document.write("<font face='arial,helvetica,sans-serif'>Enter the name of the new directory where you will store the contents of your IMS package.<br /><br />") |
newWindow.document.write("<input type='hidden' name='filename' value='$fullpath'>") |
newWindow.document.write("<input type='hidden' name='filename' value='$fullpath' />") |
newWindow.document.write("<input type='hidden' name='action' value='newdir'>") |
newWindow.document.write("<input type='hidden' name='action' value='newdir' />") |
newWindow.document.write("<input type='hidden' name='callingmode' value='imsimport'>") |
newWindow.document.write("<input type='hidden' name='callingmode' value='imsimport' />") |
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 292 sub display_one {
|
Line 300 sub display_one {
|
<font face='Arial,Helvetica,sans-serif'> |
<font face='Arial,Helvetica,sans-serif'> |
Please choose the CMS used to create your IMS content package. |
Please choose the CMS used to create your IMS content package. |
<select name="source"> |
<select name="source"> |
<option value='-1' selected="true">Please select |
<option value='-1' selected="true">Please select</option> |
<option value='bb5'>Blackboard 5 |
<option value='bb5'>Blackboard 5</option> |
<option value='bb6'>Blackboard 6 |
<option value='bb6'>Blackboard 6</option> |
<option value='angel'>ANGEL |
<option value='angel'>ANGEL</option> |
<option value='webct4'>WebCT 4 |
<option value='webct4'>WebCT 4</option> |
</select> |
</select> |
</font> |
</font> |
</td> |
</td> |
Line 319 Please choose the CMS used to create you
|
Line 327 Please choose the CMS used to create you
|
<td> </td> |
<td> </td> |
<td> |
<td> |
<font face='Arial,Helvetica,sans-serif'> |
<font face='Arial,Helvetica,sans-serif'> |
Please choose a destination LON-CAPA directory in which to store the contents of the IMS package file. <input type="button" name="createdir" value="Create Directory" onClick="javascript:createWin()"><input type="hidden" name="newdir" value=""></font> |
Please choose a destination LON-CAPA directory in which to store the contents of the IMS package file. <input type="button" name="createdir" value="Create Directory" onClick="javascript:createWin()" /><input type="hidden" name="newdir" value="" /></font> |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
Line 331 Please choose a destination LON-CAPA dir
|
Line 339 Please choose a destination LON-CAPA dir
|
</tr> |
</tr> |
<tr> |
<tr> |
<td colspan='2'> |
<td colspan='2'> |
<input type="hidden" name="uploaduname" value="$uname"> |
<input type="hidden" name="uploaduname" value="$uname" /> |
<input type="hidden" name="filename" value="$fn"> |
<input type="hidden" name="filename" value="$fn" /> |
<input type="hidden" name="phase" value="three"> |
<input type="hidden" name="phase" value="three" /> |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
Line 344 Please choose a destination LON-CAPA dir
|
Line 352 Please choose a destination LON-CAPA dir
|
<table border='0' cellspacing='0' cellpadding='0' width="100%"> |
<table border='0' cellspacing='0' cellpadding='0' width="100%"> |
<tr> |
<tr> |
<td align='left'> |
<td align='left'> |
<input type='button' name='exitpage' value='Exit now' onClick="javascript:location.href='$fullpath'"> |
<input type='button' name='exitpage' value='Exit now' onClick="javascript:location.href='$fullpath'" /> |
</td> |
</td> |
<td align='right'> |
<td align='right'> |
<input type="button" name="nextpage" value="Proceed" onClick="javascript:nextPage()"> |
<input type="button" name="nextpage" value="Proceed" onClick="javascript:nextPage()" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 482 ENDBLOCK
|
Line 490 ENDBLOCK
|
if ($area eq 'board') { |
if ($area eq 'board') { |
$r->print(" <td align='left'><font face='arial,helvetica,sans-serif'> |
$r->print(" <td align='left'><font face='arial,helvetica,sans-serif'> |
<select name='db_handling'> |
<select name='db_handling'> |
<option value='-2'><-- Check Import first |
<option value='-2'><-- Check Import first</option> |
</select></font> |
</select></font> |
</td>"); |
</td>"); |
} elsif ($area eq 'users') { |
} elsif ($area eq 'users') { |
$r->print(" <td align='left'><font face='arial,helvetica,sans-serif'> |
$r->print(" <td align='left'><font face='arial,helvetica,sans-serif'> |
<select name='user_handling'> |
<select name='user_handling'> |
<option value='-2'><-- Check Import first |
<option value='-2'><-- Check Import first</option> |
</select> |
</select> |
</font> |
</font> |
</td>"); |
</td>"); |
Line 535 ENDBLOCKTWO
|
Line 543 ENDBLOCKTWO
|
<br /><br /> |
<br /><br /> |
Choose course: |
Choose course: |
<select name='targetcourse'> |
<select name='targetcourse'> |
<option value='-1'>Not required |
<option value='-1'>Not required</option> |
</select></font> |
</select></font> |
</td> |
</td> |
</tr> |
</tr> |
Line 579 ENDBLOCK
|
Line 587 ENDBLOCK
|
<table border='0' cellspacing='0' cellpadding='0' width="100%"> |
<table border='0' cellspacing='0' cellpadding='0' width="100%"> |
<tr> |
<tr> |
<td align='left'> |
<td align='left'> |
<input type='button' name='exitpage' value='Exit now' onClick="javascript:location.href='$fullpath'"> |
<input type='button' name='exitpage' value='Exit now' onClick="javascript:location.href='$fullpath'" /> |
</td> |
</td> |
<td align='right'> |
<td align='right'> |
<input type="button" name="nextpage" value="Import package" onClick="javascript:nextPage($counter)"> |
<input type="button" name="nextpage" value="Import package" onClick="javascript:nextPage($counter)" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 861 sub handler {
|
Line 869 sub handler {
|
} elsif ($env{'form.phase'} eq 'four') { |
} elsif ($env{'form.phase'} eq 'four') { |
&jscript_three(\$javascript); |
&jscript_three(\$javascript); |
} |
} |
$r->print("<html><head><title>LON-CAPA Construction Space</title><script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n</head>"); |
$javascript = "<script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n"; |
|
|
$r->print(&Apache::loncommon::bodytag('Upload IMS package to Construction Space',undef,$loadentries)); |
my $title = 'Upload IMS package to Construction Space'; |
|
$r->print(&Apache::loncommon::start_page($title, $javascript, |
|
{'add_entries' => |
|
$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 888 sub handler {
|
Line 899 sub handler {
|
} else { |
} else { |
&Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport'); |
&Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport'); |
} |
} |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
1; |
1; |