--- loncom/interface/londocs.pm 2009/12/07 02:22:24 1.411.2.1
+++ loncom/interface/londocs.pm 2010/02/05 12:46:40 1.419
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.411.2.1 2009/12/07 02:22:24 raeburn Exp $
+# $Id: londocs.pm,v 1.419 2010/02/05 12:46:40 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -120,14 +120,19 @@ sub dumpbutton {
my $crstype = &Apache::loncommon::course_type();
if ($home+$other==0) { return ''; }
if ($home) {
- my $link = "".&mt('Dump '.$crstype.' DOCS to Construction Space')." ";
- return $link.' '.
- &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').' ';
- } else {
- return '
'.
- &mt('Dump '.$crstype.
- ' DOCS to Construction Space: available on other servers').
- '
';
+ my $link =
+ ""
+ .&mt('Dump '.$crstype.' Documents to Construction Space')
+ .' ';
+ return
+ $link.' '
+ .&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs')
+ .' ';
+ } else {
+ return
+ &mt('Dump '.$crstype.' Documents to Construction Space: available on other servers');
}
}
@@ -142,9 +147,9 @@ sub clean {
sub dumpcourse {
my ($r) = @_;
my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space').
+ $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' Documents to Construction Space').
'');
+ '
');
}
}
@@ -341,20 +346,20 @@ sub exportcourse {
open(OUTPUT, "zip -r $imszip * 2> /dev/null |");
close(OUTPUT);
chdir $cwd;
+ $outcome .= ''
+ .&mt('[_1]Your IMS package[_2] is ready for download.'
+ ,'',' ')
+ .'
';
if ($copyresult) {
$outcome .= ''
.&mt('The following errors occurred during export - [_1]'
,$copyresult)
.'
';
}
- $outcome .= ''
- .&mt('[_1]Your IMS package[_2] is ready for download.'
- ,'',' ')
- .'
';
} else {
$outcome = ''
.&mt('Unfortunately you will not be able to retrieve'
- .' an IMS archive of this posts at this time,'
+ .' an IMS archive of your course at this time,'
.' because there was a problem creating a'
.' manifest file.')
.'
'
@@ -368,24 +373,26 @@ sub exportcourse {
$r->print($outcome);
$r->print(&Apache::loncommon::end_page());
} else {
- my $display;
- $display = '');
- $r->print(''.&mt('Done').'. ');
+ $r->print(''.&mt('Done').'
');
&untiehash();
}
@@ -2618,14 +2623,6 @@ sub handler {
return OK if $r->header_only;
my $crstype = &Apache::loncommon::course_type();
- my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
- if ($coursedom eq 'gcitest') {
- my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
- if ($allowed) {
- &concept_test_builder($r);
- return OK;
- }
- }
# --------------------------------------------- Initialize help topics for this
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents',
@@ -2665,7 +2662,7 @@ sub handler {
&init_breadcrumbs('versions','Check/Set Resource Versions');
&checkversions($r);
} elsif ($allowed && $env{'form.dumpcourse'}) {
- &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space');
+ &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Documents to Construction Space');
&dumpcourse($r);
} elsif ($allowed && $env{'form.exportcourse'}) {
&init_breadcrumbs('exportcourse','IMS Export');
@@ -2906,13 +2903,13 @@ sub create_form_ul {
'upls' => 'Upload a new supplemental '.lc($crstype).' document',
'impp' => 'Import a document',
'copm' => 'All documents out of a published map into this folder',
- 'upld' => 'Upload Document',
+ 'upld' => 'Import Document',
'srch' => 'Search',
'impo' => 'Import',
'book' => 'Import Bookmarks',
'selm' => 'Select Map',
'load' => 'Load Map',
- 'reco' => 'Recover Deleted Resources',
+ 'reco' => 'Recover Deleted Documents',
'newf' => 'New Folder',
'newp' => 'New Composite Page',
'extr' => 'External Resource',
@@ -2980,9 +2977,9 @@ FUFORM
SEDFFORM
my @simpleeditdefaultforma = (
- { ' ' => "$uploadtag$lt{'srch'} " },
- { ' ' => "$lt{'impo'} $help{'Importing_LON-CAPA_Resource'}" },
- { ' ' => "$lt{'book'} " },
+ { ' ' => "$uploadtag$lt{'srch'} " },
+ { ' ' => "$lt{'impo'} $help{'Importing_LON-CAPA_Resource'}" },
+ { ' ' => "$lt{'book'} " },
);
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma));
$simpleeditdefaultform .=(<
NGFFORM
@specialdocumentsforma=(
- {' '=>$newpageform},
- {' '=>$newsylform},
- {' '=>$newgroupfileform},
+ {' '=>$newpageform},
+ {' '=>$newsylform},
+ {' '=>$newgroupfileform},
);
}
- push @specialdocumentsforma, ({' '=>$newnavform},
- {' '=>$newsmppageform},
- {' '=>$newsmpproblemform},
- {' '=>$newdropboxform},
- {' '=>$newexuploadform},
- {' '=>$newbulform},
- {' '=>$newaboutmeform},
- {' '=>$newaboutsomeoneform},
- {' '=>$newrosterform},);
+ push @specialdocumentsforma, ({' '=>$newnavform},
+ {' '=>$newsmppageform},
+ {' '=>$newsmpproblemform},
+ {' '=>$newdropboxform},
+ {' '=>$newexuploadform},
+ {' '=>$newbulform},
+ {' '=>$newaboutmeform},
+ {' '=>$newaboutsomeoneform},
+ {' '=>$newrosterform},);
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
if($env{'form.pagepath'}) {
@specialdocumentsforma=(
- {' '=>$newsmpproblemform},
- {' '=>$newexuploadform}
+ {' '=>$newsmpproblemform},
+ {' '=>$newexuploadform}
);
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma));
}
my @tools = (
- {' '=>$extresourcesform},
- {' '=>$imspform},
- {' '=>$recoverform},
+# {' '=>$extresourcesform},
+# {' '=>$imspform},
+ {' '=>$recoverform},
);
+my @importdoc = (
+ {' '=>$extresourcesform},
+ {' '=>$imspform},
+);
+$fileuploadform = create_form_ul(create_list_elements(@importdoc)) . ' ' . $fileuploadform;
my %orderhash = (
'00' => ['Newfolder',$newfolderform],
- 'aa' => ['Upload Document',$fileuploadform],
+ 'aa' => ['Import Documents',$fileuploadform],
'bb' => ['Published Resources',$simpleeditdefaultform],
'cc' => ['Special Documents',$specialdocumentsform],
'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
@@ -3417,13 +3419,19 @@ SNAMFORM
my @specialdocs = (
- {' '=>$supnewextform},
- {' '=>$supnewsylform},
- {' '=>$supnewaboutmeform},
+ {' '
+ =>$supnewsylform},
+ {' '
+ =>$supnewaboutmeform},
);
+my @supimportdoc = (
+ {' '
+ =>$supnewextform},
+ );
+$supupdocform = create_form_ul(create_list_elements(@supimportdoc)) . ' ' . $supupdocform;
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
- 'ee' => ['Upload Document',$supupdocform],
+ 'ee' => ['Import Documents',$supupdocform],
'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))]
);
@@ -3474,22 +3482,29 @@ sub generate_admin_options {
'vc' => 'Verify Content',
'cv' => 'Check/Set Resource Versions',
'ls' => 'List Symbs',
- 'sl' => 'Show Log'
+ 'sl' => 'Show Log',
+ 'imse' => 'IMS Export',
+ 'dcd' => 'Dump Course Documents to Construction Space: available on other servers'
);
my %help = %{$help_ref};
my %env = %{$env_ref};
my $dumpbut=&dumpbutton();
my $exportbut=&exportbutton();
my @list = (
- {' '=>"$lt{'vc'} $help{'Verify_Content'}"},
- {' '=>"$lt{'cv'} $help{'Check_Resource_Versions'}"},
+ {' '
+ => "$lt{'vc'} $help{'Verify_Content'}"},
+ {' '
+ =>"$lt{'cv'} $help{'Check_Resource_Versions'}"},
);
if($dumpbut ne ''){
- push @list, {' '=>$dumpbut};
+ push @list, {' '=>$dumpbut};
}
- push @list, ({' '=>$exportbut},
- {' '=>"$lt{'ls'} "},
- {' '=>"$lt{'sl'} "},
+ push @list, ({' '
+ =>$exportbut},
+ {' '
+ =>"$lt{'ls'} "},
+ {' '
+ =>"$lt{'sl'} "},
);
return ' '.create_form_ul(create_list_elements(@list)).' ';
@@ -3506,7 +3521,7 @@ sub generate_edit_table {
if($env{'form.active'} ne ''){
$activetab = $env{'form.active'};
}
- $form = '';
+ $form = '
';
$form .= '
';
foreach my $name (sort(keys(%orderhash))){
if($name ne '00'){
@@ -3540,20 +3555,6 @@ sub generate_edit_table {
return $form;
}
-sub concept_test_builder {
- my ($r) = @_;
- $r->print(&Apache::loncommon::start_page('Assemble Test'));
- &Apache::londocsgci::setdefaults();
- if ($env{'form.phase'} eq 'storemap') {
- &Apache::londocsgci::evaluate();
- &Apache::londocsgci::store($r);
- }
- &Apache::londocsgci::load();
- &Apache::londocsgci::listresources($r);
- $r->print(&Apache::loncommon::end_page());
- return;
-}
-
sub editing_js {
my ($udom,$uname) = @_;
my $now = time();