version 1.24, 2008/08/25 13:03:40
|
version 1.32, 2009/08/17 03:52:09
|
Line 1
|
Line 1
|
|
# The LearningOnline Network with CAPA |
|
# |
|
# $Id$ |
|
# |
# Copyright Michigan State University Board of Trustees |
# Copyright Michigan State University Board of Trustees |
# |
# |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
Line 86 function createWin() {
|
Line 90 function createWin() {
|
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('$start_page') |
newWindow.document.write('$start_page') |
newWindow.document.write("\\n<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n") |
newWindow.document.write("\\n<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]' />\\n") |
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='600'>\\n") |
newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='600'>\\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>$lt{'loca'} <tt>$fullpath</tt></h3><h3>$lt{'newd'}</h3></td></tr>\\n") |
newWindow.document.write("<td><h3>$lt{'loca'} <tt>$fullpath</tt></h3><h3>$lt{'newd'}</h3></td></tr>\\n") |
Line 292 sub display_one {
|
Line 296 sub display_one {
|
&Apache::lonhtmlcommon::topic_bar(1,&mt('Specify the Course Management system used to create the package')). |
&Apache::lonhtmlcommon::topic_bar(1,&mt('Specify the Course Management system used to create the package')). |
&mt('Choose the CMS used to create your IMS content package.').' |
&mt('Choose the CMS used to create your IMS content package.').' |
<select name="source"> |
<select name="source"> |
<option value="-1" selected="true">Please select</option> |
<option value="-1" selected="selected">Please select</option> |
<option value="bb5">Blackboard 5</option> |
<option value="bb5">Blackboard 5</option> |
<option value="bb6">Blackboard 6</option> |
<option value="bb6">Blackboard 6</option> |
<option value="angel">ANGEL</option> |
<option value="angel5">ANGEL 5.5</option> |
<option value="webctce4">WebCT 4 Campus Edition</option> |
<option value="webctce4">WebCT 4 Campus Edition</option> |
<option value="webctvista4">WebCT Vista 4</option> |
<option value="webctvista4">WebCT Vista 4</option> |
</select><br />'."\n". |
</select><br />'."\n". |
Line 376 sub display_two {
|
Line 380 sub display_two {
|
$count{$area} ++; |
$count{$area} ++; |
} |
} |
} |
} |
} elsif ($cms eq 'angel') { |
} elsif ($cms eq 'angel5') { |
foreach my $area (keys %{$$cmsmap{$cms}}) { |
foreach my $area (keys %{$$cmsmap{$cms}}) { |
if ($area eq 'doc') { |
if ($area eq 'doc') { |
if (grep/^$resources{$res}{type}$/,@{$$cmsmap{$cms}{doc}}) { |
if (grep/^$resources{$res}{type}$/,@{$$cmsmap{$cms}{doc}}) { |
Line 455 sub display_two {
|
Line 459 sub display_two {
|
<input type="hidden" name="conditions" value="'.$conditions.'" /> |
<input type="hidden" name="conditions" value="'.$conditions.'" /> |
<input type="hidden" name="source" value="'.$cms.'" /> |
<input type="hidden" name="source" value="'.$cms.'" /> |
<input type="hidden" name="tempdir" value="'.$tempdir.'" /> |
<input type="hidden" name="tempdir" value="'.$tempdir.'" /> |
<input type="hidden" name="uploaduname" value="'.$uname.'"> |
<input type="hidden" name="uploaduname" value="'.$uname.'" /> |
<input type="hidden" name="filename" value="'.$fname.'"> |
<input type="hidden" name="filename" value="'.$fname.'" /> |
<input type="hidden" name="phase" value="four" />'."\n"); |
<input type="hidden" name="phase" value="four" />'."\n"); |
if ($count{board} == 0) { |
if ($count{board} == 0) { |
$r->print('<input type="hidden" name="board" value="" />'."\n"); |
$r->print('<input type="hidden" name="board" value="" />'."\n"); |
Line 522 sub display_three {
|
Line 526 sub display_three {
|
|
|
foreach my $area (@{$areas}) { |
foreach my $area (@{$areas}) { |
if (defined($env{"form.$area"}) ) { |
if (defined($env{"form.$area"}) ) { |
if ($cms eq 'angel' && $area eq 'doc') { |
if ($cms eq 'angel5' && $area eq 'doc') { |
foreach (@{$$cmsmap{$cms}{$area}}) { |
foreach (@{$$cmsmap{$cms}{$area}}) { |
$importareas{$_} = 1; |
$importareas{$_} = 1; |
} |
} |
Line 595 sub display_three {
|
Line 599 sub display_three {
|
|
|
$r->print("<h3>IMS import completed</h3>"); |
$r->print("<h3>IMS import completed</h3>"); |
|
|
if ($cms eq 'angel') { |
if ($cms eq 'angel5') { |
$r->print($lt{'yims'}.' '.&mt('A total of [quant,_1,sequence], [quant,_2,composite page], and [quant,_3,bulletin board] have been created, and [quant,_4,file] copied.',$total{seq},$total{page},$total{board},$total{file})."\n"); |
$r->print($lt{'yims'}.' '.&mt('A total of [quant,_1,sequence], [quant,_2,composite page], and [quant,_3,bulletin board] have been created, and [quant,_4,file] copied.',$total{seq},$total{page},$total{board},$total{file})."\n"); |
} else { |
} else { |
$r->print($lt{'yims'}.' '.&mt('A total of [quant,_1,sequence], [quant,_2,composite page], [quant,_3,bulletin board], [quant,_4,quiz,quizzes], [quant,_5,survey], and [quant,_6,problem] have been created, and [quant,_7,file] copied.',$total{seq},$total{page},$total{board},$total{quiz},$total{surv},$total{prob},$total{file})."\n"); |
$r->print($lt{'yims'}.' '.&mt('A total of [quant,_1,sequence], [quant,_2,composite page], [quant,_3,bulletin board], [quant,_4,quiz,quizzes], [quant,_5,survey], and [quant,_6,problem] have been created, and [quant,_7,file] copied.',$total{seq},$total{page},$total{board},$total{quiz},$total{surv},$total{prob},$total{file})."\n"); |
Line 718 sub handler {
|
Line 722 sub handler {
|
my $fn; |
my $fn; |
if ($env{'form.filename'}) { |
if ($env{'form.filename'}) { |
$fn=$env{'form.filename'}; |
$fn=$env{'form.filename'}; |
$fn=~s/^http\:\/\/[^\/]+\///; |
$fn=~s/^https?\:\/\/[^\/]+\///; |
$fn=~s/^\///; |
$fn=~s/^\///; |
$fn=~s/(\~|priv\/)($LONCAPA::username_re)//; |
$fn=~s/(\~|priv\/)($LONCAPA::username_re)//; |
$fn=~s/\/+/\//g; |
$fn=~s/\/+/\//g; |
Line 758 sub handler {
|
Line 762 sub handler {
|
$r->print(&Apache::loncommon::start_page($title, $javascript)); |
$r->print(&Apache::loncommon::start_page($title, $javascript)); |
|
|
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('<p><span class="LC_warning">' |
&mt(' at ').$udom.'</font></h3>'); |
.&mt('Co-Author [_1]',$uname.':'.$udom) |
|
.'</span></p>' |
|
); |
} |
} |
if ($env{'form.phase'} eq 'two') { |
if ($env{'form.phase'} eq 'two') { |
my $flag = &Apache::lonupload::phasetwo($r,$fn,$uname,$udom,'imsimport'); |
my $flag = &Apache::lonupload::phasetwo($r,$fn,$uname,$udom,'imsimport'); |