--- loncom/interface/londocs.pm 2010/01/21 19:22:03 1.415
+++ 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.415 2010/01/21 19:22:03 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').
'');
+ '
');
}
}
@@ -423,33 +428,29 @@ sub exportcourse {
$ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard';
}
}
+ my $currelem = $count+$boards+$startcount;
$display .= &Apache::loncommon::start_data_table_row()
.''."\n"
.' is_sequence()) || ($curRes->is_page())) {
- my $checkitem = $count + $boards + $startcount;
- $display .= 'onclick="javascript:propagateCheck('."'$checkitem'".')"';
+ $lastcontainer = $currelem;
+ $display .= 'onclick="javascript:propagateCheck('."'$currelem'".')"';
}
$display .= ' />'."\n";
for (my $i=0; $i<$depth; $i++) {
- $display .= ' '
- .' '."\n";
+ $display .= (' ' x2)."\n";
}
if ($curRes->is_sequence()) {
$display .= ' '."\n";
- $lastcontainer = $count + $startcount + $boards;
} elsif ($curRes->is_page()) {
$display .= ' '."\n";
- $lastcontainer = $count + $startcount + $boards;
}
- my $currelem = $count+$boards+$startcount;
$children{$parent{$depth}} .= $currelem.':';
$display .= ' '.$curRes->title().' '."\n";
# Existing discussion posts?
if ($discussiontime{$ressymb} > 0) {
$boards ++;
- $currelem = $count+$boards+$startcount;
$display .= ''
.' '
.' '."\n";
@@ -1800,6 +1801,7 @@ sub parse_supplemental_title {
$foldertitle=&Apache::lontexconvert::msgtexconverted($4);
my $name = &Apache::loncommon::plainname($uname,$udom);
$name = &HTML::Entities::encode($name,'"<>&\'');
+ $renametitle = &HTML::Entities::encode($renametitle,'"<>&\'');
$title=''.&Apache::lonlocal::locallocaltime($time).' '.
$name.': '.$foldertitle;
}
@@ -2247,11 +2249,11 @@ sub list_symbs {
} else {
$r->print("\n");
foreach my $res ($navmap->retrieveResources()) {
- $r->print($res->compTitle()."\t".$res->symb()."\n");
+ $r->print($res->compTitle()."\t".$res->symb()."\n");
}
$r->print("\n \n");
}
- $r->print(''.&mt('Return to DOCS').' ');
+ $r->print(''.&mt('Back to Course Editor').' ');
}
@@ -2270,9 +2272,9 @@ sub verifycontent {
if ($hash{$key}=~/\.(page|sequence)$/) {
if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) {
$r->print(''.
- &mt('The following sequence or page is included more than once in your '.$crstype.': ').
+ &mt('The following sequence or page is included more than once in your '.$crstype.':').' '.
&unescape($hash{$key}).' '.
- &mt('Note that grading records for problems included in this sequence or folder will overlap. '));
+ &mt('Note that grading records for problems included in this sequence or folder will overlap.').' ');
}
}
if (($key=~/^src\_(.+)$/) && (!$alreadyseen{&unescape($hash{$key})})) {
@@ -2280,8 +2282,13 @@ sub verifycontent {
}
}
&untiehash();
- $r->print(''.&mt('Done').'. '.''.
- &mt('Return to DOCS').' ');
+ $r->print(
+ ''.&mt('Done').'
'
+ .' '
+ .''
+ .&mt('Back to Course Editor')
+ .'
'
+ );
}
@@ -2531,7 +2538,7 @@ ENDHEADERS
}
}
$r->print('');
- $r->print(''.&mt('Done').'. ');
+ $r->print(''.&mt('Done').'
');
&untiehash();
}
@@ -2655,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');
@@ -2896,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',
@@ -2970,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)],
@@ -3407,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))]
);
@@ -3466,22 +3484,27 @@ sub generate_admin_options {
'ls' => 'List Symbs',
'sl' => 'Show Log',
'imse' => 'IMS Export',
- 'dcd' => 'Dump Course DOCS to Construction Space: available on other servers'
+ '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 '';
@@ -3498,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'){