version 1.6, 2004/04/08 09:19:39
|
version 1.7, 2004/08/05 23:21:49
|
Line 1
|
Line 1
|
|
# Copyright Michigan State University Board of Trustees |
|
# |
|
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
|
# |
|
# LON-CAPA is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; either version 2 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# LON-CAPA is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU General Public License |
|
# along with LON-CAPA; if not, write to the Free Software |
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
# |
|
# /home/httpd/html/adm/gpl.txt |
|
# |
|
# http://www.lon-capa.org/ |
|
# |
|
|
package Apache::imsimport; |
package Apache::imsimport; |
|
|
use strict; |
use strict; |
Line 270 sub display_one {
|
Line 293 sub display_one {
|
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 value='bb6'>Blackboard 6 |
<option value='bb5'>Blackboard 5 |
<option value='bb5'>Blackboard 5 |
<option value='angel'>ANGEL |
<option value='angel'>ANGEL |
</select> |
</select> |
Line 376 sub display_two {
|
Line 400 sub display_two {
|
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo); |
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo); |
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') { |
if ($cms eq 'bb5' || $cms eq 'bb6') { |
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 642 sub display_three {
|
Line 666 sub display_three {
|
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo); |
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo); |
if ($manifest_result eq 'ok') { |
if ($manifest_result eq 'ok') { |
&Apache::imsprocessor::target_resources(\%resources,\%imports,\@targets); |
&Apache::imsprocessor::target_resources(\%resources,\%imports,\@targets); |
my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow); |
|
|
|
my @boards = (); |
my @boards = (); |
my @announcements = (); |
my @announcements = (); |
Line 654 sub display_three {
|
Line 677 sub display_three {
|
my %boardnum = (); |
my %boardnum = (); |
my @topurls = (); |
my @topurls = (); |
my @topnames = (); |
my @topnames = (); |
|
my @packages = (); |
|
|
&Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$newdir,$seqstem,\@resrcfiles); |
&Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$newdir,$seqstem,\@resrcfiles,\@packages,\%hrefs); |
|
|
|
my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow); |
|
|
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames); |
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages); |
|
|
$r->print("<h3>Step 3: Publish your new LON-CAPA materials</h3>"); |
$r->print("<h3>Step 3: Publish your new LON-CAPA materials</h3>"); |
|
|