version 1.41, 2013/07/15 14:32:51
|
version 1.44, 2013/09/23 17:35:05
|
Line 286 END_OF_TWO
|
Line 286 END_OF_TWO
|
# ---------------------------------------------------------------- Display One |
# ---------------------------------------------------------------- Display One |
sub display_one { |
sub display_one { |
my ($r,$fn,$fullpath,$formname) = @_; |
my ($r,$fn,$fullpath,$formname) = @_; |
$r->print('<form name="'.$formname.'" method="post">'. |
$r->print('<form name="'.$formname.'" method="post" action="">'. |
&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"> |
Line 332 sub display_two {
|
Line 332 sub display_two {
|
type => 'Content type', |
type => 'Content type', |
addo => 'Additional options', |
addo => 'Additional options', |
chec => 'Check Import first', |
chec => 'Check Import first', |
bbus => 'Choose a course to receive bulletin boards and user enrollment', |
bbus => 'Choose a course to receive discussion boards and user enrollment', |
list => 'A listing of possible course targets will be displayed if import of bulletin boards and/or enrollment is checked above (step 3). If you do not plan to import either of these content types, there is no need to specify a course.', |
list => 'A listing of possible course targets will be displayed if import of discussion boards and/or enrollment is checked above (step 3). If you do not plan to import either of these content types, there is no need to specify a course.', |
chco => 'Choose course:', |
chco => 'Choose course:', |
nreq => 'Not required', |
nreq => 'Not required', |
yodo => 'You do not have active course coordinator status in any LON-CAPA courses currently, so bulletin boards and enrollment information included in your IMS package will be discarded, regardless of your import choice for these two items above (step 3).', |
yodo => 'You do not have active course coordinator status in any LON-CAPA courses currently, so discussion boards and enrollment information included in your IMS package will be discarded, regardless of your import choice for these two items above (step 3).', |
ifyo => "If you wish to import bulletin boards and/or user information into LON-CAPA please click 'Exit now' to quit the current IMS import process, and contact your domain coordinator and request a course coordinator role in a LON-CAPA course into which you can upload bulletin boards and/or enroll users.", |
ifyo => "If you wish to import discussion boards and/or user information into LON-CAPA please click 'Exit now' to quit the current IMS import process, and contact your domain coordinator and request a course coordinator role in a LON-CAPA course into which you can upload discussion boards and/or enroll users.", |
impa => 'Import package', |
impa => 'Import package', |
unpa => 'Unpacking of your IMS package failed because an IMS manifest file was not located in the package', |
unpa => 'Unpacking of your IMS package failed because an IMS manifest file was not located in the package', |
proc => 'Processing of your IMS package failed because the file you uploaded could not be unzipped', |
proc => 'Processing of your IMS package failed because the file you uploaded could not be unzipped', |
Line 396 sub display_two {
|
Line 396 sub display_two {
|
$conditions = 'none'; |
$conditions = 'none'; |
} |
} |
|
|
$r->print('<form name="pickoptions" method="post">'. |
$r->print('<form name="pickoptions" method="post" action="">'. |
&Apache::lonhtmlcommon::topic_bar(3,$lt{'cont'}). |
&Apache::lonhtmlcommon::topic_bar(3,$lt{'cont'}). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table_header_row(). |
Line 543 sub display_three {
|
Line 543 sub display_three {
|
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
\%resources,\%items,\%hrefs,\%resinfo,'prepare', |
\%resources,\%items,\%hrefs,\%resinfo,'prepare', |
\%includedres); |
\%includedres); |
|
|
if ($manifest_result eq 'ok') { |
if ($manifest_result eq 'ok') { |
|
my %possibledep; |
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; |
Line 552 sub display_three {
|
Line 554 sub display_three {
|
$resources{$res}{type} eq 'webct.question') { |
$resources{$res}{type} eq 'webct.question') { |
push(@assessmentfiles,$res); |
push(@assessmentfiles,$res); |
} |
} |
|
} elsif ($resources{$res}{usedby}) { |
|
$possibledep{$res} = 1; |
|
} |
|
} |
|
foreach my $res (sort(keys(%possibledep))) { |
|
if ($includedres{$resources{$res}{usedby}}) { |
|
$includedres{$res} = 1; |
} |
} |
} |
} |
foreach my $itm (sort keys %items) { |
foreach my $itm (sort keys %items) { |
Line 566 sub display_three {
|
Line 575 sub display_three {
|
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
$manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir, |
\%resources,\%items,\%hrefs,\%resinfo,'build', |
\%resources,\%items,\%hrefs,\%resinfo,'build', |
\%includedres,\%includeditems); |
\%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 584 sub display_three {
|
Line 594 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,\@assessmentfiles,\%total); |
my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,\%resources,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\@assessmentfiles,\%total); |
|
|
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,$dirpath,$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,$dirpath,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems,\%randompicks); |
|
|
$r->print("<h3>IMS import completed</h3>"); |
$r->print("<h3>IMS import completed</h3>"); |
|
|
if ($cms eq 'angel5') { |
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,discussion 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,discussion 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('<br /><br />'.$lt{'plsv'}.' '.$lt{'tseq'}.'<br /><br />'.$lt{'tfin'}.'<br /><br /><a href="/priv/'.$udom.'/'.$uname.'/'.$dirpath.'/">'.$lt{'disp'}.'</a>'); |
$r->print('<br /><br />'.$lt{'plsv'}.' '.$lt{'tseq'}.'<br /><br />'.$lt{'tfin'}.'<br /><br /><a href="/priv/'.$udom.'/'.$uname.'/'.$dirpath.'/">'.$lt{'disp'}.'</a>'); |
my $londocroot = $r->dir_config('lonDocRoot'); |
my $londocroot = $r->dir_config('lonDocRoot'); |