version 1.14, 2006/03/23 23:12:21
|
version 1.19, 2006/04/04 08:18:33
|
Line 78 function createWin() {
|
Line 78 function createWin() {
|
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>") |
newWindow.document.write("</table>") |
Line 300 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='webctce4'>WebCT 4 Campus Edition</option> |
|
<option value='webctvista4'>WebCT Vista 4</option> |
</select> |
</select> |
</font> |
</font> |
</td> |
</td> |
Line 327 Please choose the CMS used to create you
|
Line 328 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 339 Please choose a destination LON-CAPA dir
|
Line 340 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 352 Please choose a destination LON-CAPA dir
|
Line 353 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 408 sub display_two {
|
Line 409 sub display_two {
|
my $conditions; |
my $conditions; |
|
|
if ($unzip_result eq 'ok') { |
if ($unzip_result eq 'ok') { |
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'choose',\%includedres,\%includeditems); |
$manifest_result = &Apache::imsprocessor::process_manifest($cms, |
|
$tempdir,\%resources,\%items,\%hrefs,\%resinfo, |
|
'choose',\%includedres,\%includeditems); |
if ($manifest_result eq 'ok') { |
if ($manifest_result eq 'ok') { |
foreach my $res (sort keys %resources) { |
foreach my $res (sort keys %resources) { |
if ($cms eq 'bb5' || $cms eq 'bb6' || $cms eq 'webct4') { |
if ($cms eq 'bb5' || $cms eq 'bb6' || $cms eq 'webctce4' |
|
|| $cms eq 'webctvista4') { |
foreach my $area (keys %{$$cmsmap{$cms}}) { |
foreach my $area (keys %{$$cmsmap{$cms}}) { |
if ($resources{$res}{type} eq $$cmsmap{$cms}{$area}) { |
if ($resources{$res}{type} eq $$cmsmap{$cms}{$area}) { |
$count{$area} ++; |
$count{$area} ++; |
Line 490 ENDBLOCK
|
Line 494 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 543 ENDBLOCKTWO
|
Line 547 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 587 ENDBLOCK
|
Line 591 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 650 sub display_three {
|
Line 654 sub display_three {
|
my @pages = (); |
my @pages = (); |
my @sequences = (); |
my @sequences = (); |
my @resrcfiles = (); |
my @resrcfiles = (); |
|
my @assessmentfiles = (); |
|
|
my $tempdir = $env{'form.tempdir'}; |
my $tempdir = $env{'form.tempdir'}; |
|
|
Line 670 sub display_three {
|
Line 675 sub display_three {
|
} |
} |
} |
} |
|
|
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'prepare',\%includedres); |
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
|
\%resources,\%items,\%hrefs,\%resinfo,'prepare', |
|
\%includedres); |
if ($manifest_result eq 'ok') { |
if ($manifest_result eq 'ok') { |
foreach my $res (sort keys %resources) { |
foreach my $res (sort keys %resources) { |
if ($importareas{$resources{$res}{type}}) { |
if ($importareas{$resources{$res}{type}}) { |
$includedres{$res} = 1; |
$includedres{$res} = 1; |
|
if ($resources{$res}{type} eq 'webct.manifest' || |
|
$resources{$res}{type} eq 'webct.assessment' || |
|
$resources{$res}{type} eq 'webct.question') { |
|
push(@assessmentfiles,$res); |
|
} |
} |
} |
} |
} |
foreach my $itm (sort keys %items) { |
foreach my $itm (sort keys %items) { |
Line 686 sub display_three {
|
Line 698 sub display_three {
|
&Apache::imsprocessor::get_parents(\%includeditems,\%items,$itm); |
&Apache::imsprocessor::get_parents(\%includeditems,\%items,$itm); |
} |
} |
|
|
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'build',\%includedres,\%includeditems); |
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
|
\%resources,\%items,\%hrefs,\%resinfo,'build', |
|
\%includedres,\%includeditems); |
if ($manifest_result eq 'ok') { |
if ($manifest_result eq 'ok') { |
&Apache::imsprocessor::target_resources(\%resources,\%importareas,\@targets); |
&Apache::imsprocessor::target_resources(\%resources,\%importareas,\@targets); |
|
|
Line 705 sub display_three {
|
Line 719 sub display_three {
|
|
|
&Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@targets,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences,\%randompicks); |
&Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@targets,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences,\%randompicks); |
|
|
my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\%importareas); |
my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\%importareas,\@assessmentfiles); |
|
|
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems,\%randompicks); |
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems,\%randompicks); |
|
|