@@ -3260,7 +3644,7 @@ $form_common."\n".
push(@{$filtersref->{'randomorder'}},$orderidx);
}
}
- my $formname = 'edit_rorder_'.$orderidx;
+ $formname = 'edit_rorder_'.$orderidx;
$rand_order_text =
'
';
}
@@ -3651,8 +4036,8 @@ sub list_symbs {
sub verifycontent {
my ($r) = @_;
my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));
+ $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
$r->print(&startContentScreen('tools'));
$r->print(''.&mt($crstype.' content verification').' ');
$hashtied=0;
@@ -3688,8 +4073,8 @@ sub devalidateversioncache {
sub checkversions {
my ($r) = @_;
my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page("Check $crstype Document Versions"));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Document Versions"));
+ $r->print(&Apache::loncommon::start_page("Check $crstype Resource Versions"));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Resource Versions"));
$r->print(&startContentScreen('tools'));
my $header='';
@@ -3754,7 +4139,7 @@ sub checkversions {
&changewarning($r,'');
if ($env{'form.timerange'} eq 'all') {
# show all documents
- $header=&mt('All Documents in '.$crstype);
+ $header=&mt('All content in '.$crstype);
$allsel=' selected="selected"';
foreach my $key (keys(%hash)) {
if ($key=~/^ids\_(\/res\/.+)$/) {
@@ -3845,10 +4230,30 @@ $lt{'sc'}:
$lt{'vers'}
-
ENDHEADERS
#number of columns for version history
+ my %changedbytime;
+ foreach my $key (keys(%changes)) {
+ #excludes not versionable problems from resource version history:
+ next if ($key =~ /^\/res\/lib\/templates/);
+ my $chg;
+ if ($env{'form.timerange'} eq 'all') {
+ my ($root,$extension)=($key=~/^(.*)\.(\w+)$/);
+ $chg = &Apache::lonnet::metadata($root.'.'.$extension,'lastrevisiondate');
+ } else {
+ $chg = $changes{$key};
+ next if ($chg < $starttime);
+ }
+ push(@{$changedbytime{$chg}},$key);
+ }
+ if (keys(%changedbytime) == 0) {
+ &untiehash();
+ $r->print(&mt('No content changes in imported content in specified time frame').
+ &endContentScreen());
+ return;
+ }
$r->print(
+ ' '.
&Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
''.&mt('Resources').' '.
@@ -3858,26 +4263,25 @@ ENDHEADERS
''.&mt('History').' '.
&Apache::loncommon::end_data_table_header_row()
);
- foreach my $key (sort(keys(%changes))) {
- #excludes not versionable problems from resource version history:
- next unless ($changes{$key}>$starttime && $key !~ /^\/res\/lib\/templates/);
- my ($root,$extension)=($key=~/^(.*)\.(\w+)$/);
- my $currentversion=&Apache::lonnet::getversion($key);
- if ($currentversion<0) {
- $currentversion=''.&mt('Could not be determined.').' ';
- }
- my $linkurl=&Apache::lonnet::clutter($key);
- $r->print(
- &Apache::loncommon::start_data_table_row().
- ''.&Apache::lonnet::gettitle($linkurl).' '.
- ''.$linkurl.' '.
- ''.$currentversion.' ('.
- &Apache::lonlocal::locallocaltime(&Apache::lonnet::metadata($root.'.'.$extension,'lastrevisiondate')).') '.
- ''
- );
- # Used in course
- my $usedversion=$hash{'version_'.$linkurl};
- if (($usedversion) && ($usedversion ne 'mostrecent')) {
+ foreach my $chg (sort {$b <=> $a } keys(%changedbytime)) {
+ foreach my $key (sort(@{$changedbytime{$chg}})) {
+ my ($root,$extension)=($key=~/^(.*)\.(\w+)$/);
+ my $currentversion=&Apache::lonnet::getversion($key);
+ if ($currentversion<0) {
+ $currentversion=''.&mt('Could not be determined.').' ';
+ }
+ my $linkurl=&Apache::lonnet::clutter($key);
+ $r->print(
+ &Apache::loncommon::start_data_table_row().
+ ' '.&Apache::lonnet::gettitle($linkurl).' '.
+ ''.$linkurl.' '.
+ ''.$currentversion.' ('.
+ &Apache::lonlocal::locallocaltime($chg).') '.
+ ''
+ );
+ # Used in course
+ my $usedversion=$hash{'version_'.$linkurl};
+ if (($usedversion) && ($usedversion ne 'mostrecent')) {
if ($usedversion != $currentversion) {
$r->print(''.$usedversion.' ');
} else {
@@ -3886,44 +4290,45 @@ ENDHEADERS
} else {
$r->print($currentversion);
}
- $r->print(' ');
- # Set version
- $r->print(&Apache::loncommon::select_form(
- $setversions{$linkurl},
- 'set_version_'.$linkurl,
- {'select_form_order' => ['',1..$currentversion,'mostrecent'],
- '' => '',
- 'mostrecent' => &mt('most recent'),
- map {$_,$_} (1..$currentversion)}));
- my $lastold=1;
- for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
- my $url=$root.'.'.$prevvers.'.'.$extension;
- if (&Apache::lonnet::metadata($url,'lastrevisiondate')<$starttime) {
- $lastold=$prevvers;
- }
- }
- $r->print(' ');
- # List all available versions
- $r->print('');
- for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
- my $url=$root.'.'.$prevvers.'.'.$extension;
- $r->print(
- ''
- .''
- .&mt('Version [_1]',$prevvers).' '
- .' ('.&Apache::lonlocal::locallocaltime(
- &Apache::lonnet::metadata($url,'lastrevisiondate'))
- .')');
- if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ $r->print(' ');
+ # Set version
+ $r->print(&Apache::loncommon::select_form(
+ $setversions{$linkurl},
+ 'set_version_'.$linkurl,
+ {'select_form_order' => ['',1..$currentversion,'mostrecent'],
+ '' => '',
+ 'mostrecent' => &mt('most recent'),
+ map {$_,$_} (1..$currentversion)}));
+ my $lastold=1;
+ for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
+ if (&Apache::lonnet::metadata($url,'lastrevisiondate')<$starttime) {
+ $lastold=$prevvers;
+ }
+ }
+ $r->print(' ');
+ # List all available versions
+ $r->print('');
+ for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
+ my $url=$root.'.'.$prevvers.'.'.$extension;
$r->print(
- ' &').
- '" target="diffs">'.&mt('Diffs').' ');
+ ''
+ .''
+ .&mt('Version [_1]',$prevvers).' '
+ .' ('.&Apache::lonlocal::locallocaltime(
+ &Apache::lonnet::metadata($url,'lastrevisiondate'))
+ .')');
+ if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ $r->print(
+ ' &').
+ '" target="diffs">'.&mt('Diffs').' ');
+ }
+ $r->print(' ');
}
- $r->print(' ');
+ $r->print(' '.&Apache::loncommon::end_data_table_row());
}
- $r->print(''.&Apache::loncommon::end_data_table_row());
}
$r->print(
&Apache::loncommon::end_data_table().
@@ -3933,6 +4338,7 @@ ENDHEADERS
&untiehash();
$r->print(&endContentScreen());
+ return;
}
sub mark_hash_old {
@@ -3987,13 +4393,13 @@ $help{'Caching'}.''."\n\n");
sub init_breadcrumbs {
- my ($form,$text)=@_;
+ my ($form,$text,$help)=@_;
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs?tools=1",
text=>&Apache::loncommon::course_type().' Editor',
faq=>273,
bug=>'Instructor Interface',
- help => 'Docs_Adding_Course_Doc'});
+ help => $help});
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs?".$form.'=1',
text=>$text,
faq=>273,
@@ -4031,7 +4437,7 @@ sub startContentScreen {
$output .= ' '.&mt('Content Search').' '."\n";
$output .= ''.&mt('Supplemental Content').' ';
} else {
- $output .= ' '.&mt('Content Editor').' '."\n";
+ $output .= ' '.&mt('Main Content Editor').' '."\n";
$output .= ''.&mt('Supplemental Content Editor').' '."\n";
$output .= ' '.&mt('Content Utilities').' '."\n";
'> '.&mt('Content Utilities').' ';
@@ -4052,7 +4458,7 @@ sub endContentScreen {
}
sub supplemental_base {
- return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content'));
+ return 'supplemental&'.&escape(&mt('Supplemental Content'));
}
sub handler {
@@ -4076,8 +4482,8 @@ sub handler {
'Adding_Folders','Docs_Overview', 'Load_Map',
'Supplemental','Score_Upload_Form','Adding_Pages',
'Importing_LON-CAPA_Resource','Importing_IMS_Course',
- 'Uploading_From_Harddrive',
- 'Check_Resource_Versions','Verify_Content') {
+ 'Uploading_From_Harddrive','Course_Roster','Web_Page',
+ 'Dropbox','Simple_Problem') {
$help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);
}
# Composite help files
@@ -4085,16 +4491,12 @@ sub handler {
'Docs_About_Syllabus,Docs_Editing_Templated_Pages');
$help{'Simple Page'} = &Apache::loncommon::help_open_topic(
'Docs_About_Simple_Page,Docs_Editing_Templated_Pages');
- $help{'Simple Problem'} = &Apache::loncommon::help_open_topic(
- 'Option_Response_Simple');
$help{'Bulletin Board'} = &Apache::loncommon::help_open_topic(
'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
$help{'My Personal Information Page'} = &Apache::loncommon::help_open_topic(
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
$help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
- $help{'Course Roster'} = &Apache::loncommon::help_open_topic('Docs_Course_Roster');
- $help{'Web Page'} = &Apache::loncommon::help_open_topic('Docs_Web_Page');
my $allowed;
# URI is /adm/supplemental when viewing supplemental docs in non-edit mode.
@@ -4103,13 +4505,9 @@ sub handler {
$allowed = &Apache::lonnet::allowed('mdc',$env{'request.course.id'});
}
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['chooseserver',
- 'inhibitmenu']);
- if ($allowed && $env{'form.chooseserver'}) {
- &choose_dump_server($r);
- return OK;
- } elsif ($allowed && $env{'form.verify'}) {
- &init_breadcrumbs('verify','Verify Content');
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);
+ if ($allowed && $env{'form.verify'}) {
+ &init_breadcrumbs('verify','Verify Content','Docs_Verify_Content');
&verifycontent($r);
} elsif ($allowed && $env{'form.listsymbs'}) {
&init_breadcrumbs('listsymbs','List Content IDs');
@@ -4122,10 +4520,10 @@ sub handler {
}
&docs_change_log($r,$coursenum,$coursedom,$folder,$allowed,$crstype,$iconpath);
} elsif ($allowed && $env{'form.versions'}) {
- &init_breadcrumbs('versions','Check/Set Resource Versions');
+ &init_breadcrumbs('versions','Check/Set Resource Versions','Docs_Check_Resource_Versions');
&checkversions($r);
} elsif ($allowed && $env{'form.dumpcourse'}) {
- &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Content to Authoring Space');
+ &init_breadcrumbs('dumpcourse','Copy '.&Apache::loncommon::course_type().' Content to Authoring Space');
&dumpcourse($r);
} elsif ($allowed && $env{'form.exportcourse'}) {
&init_breadcrumbs('exportcourse','IMS Export');
@@ -4151,9 +4549,9 @@ sub handler {
# supplementalflag=0: show standard documents
# toolsflag=1: show utilities
- $env{'form.folderpath'} = &unescape($env{'form.folderpath'});
- my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/);
- if (($env{'form.folderpath'}=~/^default/) || ($env{'form.folderpath'} eq "")) {
+ my $unesc_folderpath = &unescape($env{'form.folderpath'});
+ my $supplementalflag=($unesc_folderpath=~/^supplemental/);
+ if (($unesc_folderpath=~/^default/) || ($unesc_folderpath eq "")) {
$supplementalflag=0;
}
if ($env{'form.forcesupplement'}) { $supplementalflag=1; }
@@ -4185,7 +4583,7 @@ sub handler {
}
} elsif ($env{'form.command'} eq 'editdocs') {
$env{'form.folderpath'} = 'default&'.
- &escape(&mt('Main '.$crstype.' Content').':::::');
+ &escape(&mt('Main Content').':::::');
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});
} elsif ($env{'form.command'} eq 'editsupp') {
$env{'form.folderpath'} = 'supplemental&'.
@@ -4230,7 +4628,7 @@ sub handler {
if ($supplementalflag) {
$env{'form.folderpath'}=&supplemental_base();
} else {
- $env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content').
+ $env{'form.folderpath'}='default&'.&escape(&mt('Main Content').
':::::');
}
}
@@ -4256,7 +4654,7 @@ sub handler {
if ($env{'form.folder'} eq '' ||
$env{'form.folder'} eq 'supplemental') {
$folderpath='default&'.
- &escape(&mt('Main '.$crstype.' Content').':::::');
+ &escape(&mt('Main Content').':::::');
}
}
$containertag = ' ';
@@ -4293,9 +4691,11 @@ sub handler {
$script .= &dump_switchserver_js(@hosts);
}
} else {
+ my $tid = 1;
my @tabids;
if ($supplementalflag) {
@tabids = ('002','ee2','ff2');
+ $tid = 2;
} else {
@tabids = ('aa1','bb1','cc1','ff1');
unless ($env{'form.folderpath'} =~ /\:1$/) {
@@ -4307,7 +4707,7 @@ sub handler {
$script .= &editing_js($udom,$uname,$supplementalflag).
&history_tab_js().
&inject_data_js().
- &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr).
+ &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid).
&Apache::lonextresedit::extedit_javascript();
$addentries = {
onload => "javascript:resize_scrollbox('contentscroll','1','1');",
@@ -4332,6 +4732,14 @@ sub handler {
if ($showdoc) {
$r->print(&Apache::loncommon::start_page("$crstype documents",undef,
{'force_register' => $showdoc,}));
+ } elsif ($toolsflag) {
+ &Apache::lonhtmlcommon::add_breadcrumb({
+ href=>"/adm/coursedocs",text=>"$crstype Contents"});
+ $r->print(&Apache::loncommon::start_page("$crstype Contents", $script)
+ .&Apache::loncommon::help_open_menu('','',273,'RAT')
+ .&Apache::lonhtmlcommon::breadcrumbs(
+ 'Editing Course Contents')
+ );
} elsif ($r->uri eq '/adm/supplemental') {
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype);
$r->print(&Apache::loncommon::start_page("Supplemental $crstype Content",undef,
@@ -4359,7 +4767,7 @@ sub handler {
# Process file upload - phase one - upload and parse primary file.
undef($hadchanges);
$uploadphase = &process_file_upload(\$upload_output,$coursenum,$coursedom,
- \%allfiles,\%codebase,$context);
+ \%allfiles,\%codebase,$context,$crstype);
if ($hadchanges) {
&mark_hash_old();
}
@@ -4411,7 +4819,7 @@ sub handler {
my %lt=&Apache::lonlocal::texthash(
'copm' => 'All documents out of a published map into this folder',
'upfi' => 'Upload File',
- 'upld' => 'Import Content',
+ 'upld' => 'Upload Content',
'srch' => 'Search',
'impo' => 'Import',
'lnks' => 'Import from Stored Links',
@@ -4432,15 +4840,19 @@ sub handler {
'grpo' => 'Group Portfolio',
'rost' => 'Course Roster',
'abou' => 'Personal Information Page for a User',
- 'imsf' => 'IMS Import',
- 'imsl' => 'Import IMS package',
+ 'imsf' => 'IMS Upload',
+ 'imsl' => 'Upload IMS package',
'cms' => 'Origin of IMS package',
'se' => 'Select',
'file' => 'File',
'title' => 'Title',
'comment' => 'Comment',
'parse' => 'Upload embedded images/multimedia files if HTML file',
- );
+ 'bb5' => 'Blackboard 5',
+ 'bb6' => 'Blackboard 6',
+ 'angel5' => 'ANGEL 5.5',
+ 'webctce4' => 'WebCT 4 Campus Edition',
+ );
# -----------------------------------------------------------------------------
my $fileupload=(<
@@ -4471,10 +4883,10 @@ CHBO
$lt{'cms'}:
$lt{'se'}
- Blackboard 5
- Blackboard 6
- ANGEL 5.5
- WebCT 4 Campus Edition
+ $lt{'bb5'}
+ $lt{'bb6'}
+ $lt{'angel5'}
+ $lt{'webctce4'}
@@ -4581,7 +4993,7 @@ HIDDENFORM
if ($folder eq '' || $supplementalflag) {
$folder='default';
$savefolderpath = $env{'form.folderpath'};
- $env{'form.folderpath'}='default&'.&escape(&mt('Content'));
+ $env{'form.folderpath'}='default&'.&escape(&mt('Main Content'));
$pathitem = ' ';
}
@@ -4602,7 +5014,7 @@ HIDDENFORM
my $newnavform=(<
-
+
$pathitem
@@ -4612,7 +5024,7 @@ HIDDENFORM
NNFORM
my $newsmppageform=(<
-
+
$pathitem
@@ -4626,7 +5038,7 @@ NSPFORM
$pathitem
- $help{'Simple Problem'}
+ $help{'Simple_Problem'}
NSPROBFORM
@@ -4637,6 +5049,7 @@ NSPROBFORM
$pathitem
+ $help{'Dropbox'}
NDBFORM
@@ -4652,7 +5065,7 @@ NEXUFORM
my $newbulform=(<
-
+
$pathitem
@@ -4662,7 +5075,7 @@ NBFORM
my $newaboutmeform=(<
-
+
$pathitem
@@ -4673,7 +5086,7 @@ NAMFORM
my $newaboutsomeoneform=(<
-
+
$pathitem
@@ -4682,12 +5095,12 @@ NASOFORM
my $newrosterform=(<
-
+
$pathitem
- $help{'Course Roster'}
+ $help{'Course_Roster'}
NROSTFORM
@@ -4703,11 +5116,11 @@ NROSTFORM
}
my $newwebpageform =(<
-
+
$pathitem
- $help{'Web Page'}
+ $help{'Web_Page'}
NWEBFORM
@@ -4727,7 +5140,7 @@ my $newfolderb;
@@ -4738,14 +5151,14 @@ NPFORM
NFFORM
my $newsylform=(<
-
+
$pathitem
@@ -4757,7 +5170,7 @@ NSYLFORM
my $newgroupfileform=(<
-
+
$pathitem
@@ -4784,7 +5197,7 @@ NGFFORM
);
}
push(@importdoc,
- {' '=>$fileuploadform}
+ {' '=>$fileuploadform}
);
$fileuploadform = &create_form_ul(&create_list_elements(@importdoc));
@@ -4806,14 +5219,14 @@ NGFFORM
$communityform = &create_form_ul(&create_list_elements(@communityforma));
my %orderhash = (
- 'aa' => ['Import Content',$fileuploadform],
- 'bb' => ['Published Content',$importpubform],
- 'cc' => ['Grading Resources',$gradingform],
+ 'aa' => ['Upload',$fileuploadform],
+ 'bb' => ['Import',$importpubform],
+ 'cc' => ['Grading',$gradingform],
);
unless ($container eq 'page') {
$orderhash{'00'} = ['Newfolder',$newfolderform];
$orderhash{'dd'} = ['Collaboration',$communityform];
- $orderhash{'ee'} = ['Special Pages',$specialdocumentsform];
+ $orderhash{'ee'} = ['Other',$specialdocumentsform];
}
$hadchanges=0;
@@ -4874,7 +5287,7 @@ SUPDOCFORM
my $supnewfolderform=(<
-
+
$pathitem
@@ -4924,7 +5337,7 @@ SNAMFORM
$pathitem
- $help{'Web Page'}
+ $help{'Web_Page'}
SWEBFORM
@@ -4947,14 +5360,27 @@ my @supimportdoc = (
$supupdocform = &create_form_ul(&create_list_elements(@supimportdoc));
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
- 'ee' => ['Import Content',$supupdocform],
- 'ff' => ['Special Pages',&create_form_ul(&create_list_elements(@specialdocs))]
+ 'ee' => ['Upload',$supupdocform],
+ 'ff' => ['Other',&create_form_ul(&create_list_elements(@specialdocs))]
);
if ($supplementalflag) {
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype,
$supplementalflag,\%suporderhash,$iconpath,$pathitem);
if ($error) {
$r->print(''.$error.'
');
+ } else {
+ if ($suppchanges) {
+ my %servers = &Apache::lonnet::internet_dom_servers($coursedom);
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $server (keys(%servers)) {
+ next if (grep(/^\Q$server\E$/,@ids));
+ my $hashid=$coursenum.':'.$coursedom;
+ my $cachekey = &escape('suppcount').':'.&escape($hashid);
+ &Apache::lonnet::remote_devalidate_cache($server,[$cachekey]);
+ }
+ &Apache::lonnet::get_numsuppfiles($coursenum,$coursedom,1);
+ undef($suppchanges);
+ }
}
}
} elsif ($supplementalflag) {
@@ -5103,7 +5529,7 @@ sub remove_archive {
my $currcmd = $env{'form.cmd'};
my $position = $env{'form.position'};
if ($position > 0) {
- $env{'form.cmd'} = 'del_'.$position;
+ $env{'form.cmd'} = 'remove_'.$position;
my ($title,$url,@rrest) =
split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);
if (&handle_edit_cmd($docuname,$docudom)) {
@@ -5138,13 +5564,13 @@ sub generate_admin_menu {
my ($crstype) = @_;
my $lc_crstype = lc($crstype);
my ($home,$other,%outhash)=&authorhosts();
- my %lt=&Apache::lonlocal::texthash (
+ my %lt= ( # do not translate here
'vc' => 'Verify Content',
'cv' => 'Check/Set Resource Versions',
'ls' => 'List Resource Identifiers',
'imse' => 'Export contents to IMS Archive',
- 'dcd' => "Dump $crstype Content to Authoring Space",
- );
+ 'dcd' => "Copy $crstype Content to Authoring Space",
+ );
my ($candump,$dumpurl);
if ($home + $other > 0) {
$candump = 'F';
@@ -5174,14 +5600,14 @@ sub generate_admin_menu {
{ linktext => $lt{'vc'},
url => "javascript:injectData(document.courseverify,'dummy','verify','$lt{'vc'}')",
permission => 'F',
- help => 'Verify_Content',
+ help => 'Docs_Verify_Content',
icon => 'verify.png',
linktitle => 'Verify contents can be retrieved/rendered',
},
{ linktext => $lt{'cv'},
url => "javascript:injectData(document.courseverify,'dummy','versions','$lt{'cv'}')",
permission => 'F',
- help => 'Check_Resource_Versions',
+ help => 'Docs_Check_Resource_Versions',
icon => 'resversion.png',
linktitle => "View version information for resources in your $lc_crstype, and fix/unfix use of specific versions",
},
@@ -5206,7 +5632,7 @@ sub generate_admin_menu {
{ linktext => $lt{'dcd'},
url => $dumpurl,
permission => $candump,
- #help => '',
+ help => 'Docs_Dump_Course_Docs',
icon => 'dump.png',
linktitle => $lt{'dcd'},
},
@@ -5226,7 +5652,7 @@ sub generate_edit_table {
my $form;
my $activetab;
my $active;
- if (($env{'form.active'} ne '') && ($env{'form.active'} ne 'aa')) {
+ if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) {
$activetab = $env{'form.active'};
}
my $backicon = $iconpath.'clickhere.gif';
@@ -5261,7 +5687,7 @@ sub generate_edit_table {
$form .= ''.&mt(${$orderhash{$name}}[0]).' '."\n";
} else {
- $form .= ''.${$orderhash{$name}}[1].' '."\n";
+ $form .= ''.${$orderhash{$name}}[1].' '."\n";
}
}
@@ -5365,7 +5791,7 @@ sub editing_js {
$main_container_page = 1;
}
my $toplevelmain =
- &escape(&mt('Main '.$crstype.' Content').':::::');
+ &escape(&mt('Main Content').':::::');
my $toplevelsupp = &supplemental_base();
my $backtourl;
@@ -5824,10 +6250,12 @@ for (i = 0; i < currentLis.length; i++)
function hideAll(current, nav, data) {
unselectInactive(nav);
-if(current.className == 'right'){
+if (current) {
+ if (current.className == 'right'){
current.className = 'right active'
- }else{
+ } else {
current.className = 'active';
+ }
}
currentData = document.getElementById(data);
currentDivs = currentData.getElementsByTagName('DIV');
@@ -5858,10 +6286,24 @@ function openTabs(pageId) {
}
function showPage(current, pageId, nav, data) {
+ currstate = current.className;
hideAll(current, nav, data);
openTabs(pageId);
unselectInactive(nav);
- current.className = 'active';
+ if ((currstate == 'active') || (currstate == 'right active')) {
+ if (currstate == 'active') {
+ current.className = '';
+ } else {
+ current.className = 'right';
+ }
+ activeTab = '';
+ toggleUpload();
+ toggleMap();
+ resize_scrollbox('contentscroll','1','0');
+ return;
+ } else {
+ current.className = 'active';
+ }
currentData = document.getElementById(pageId);
currentData.style.display = 'block';
activeTab = pageId;
@@ -6249,9 +6691,9 @@ ENDINJECT
sub dump_switchserver_js {
my @hosts = @_;
my %lt = &Apache::lonlocal::texthash(
- dump => 'Dumping to Authoring Space requires switching server.',
+ dump => 'Copying content to Authoring Space requires switching server.',
swit => 'Switch server?',
- duco => 'Dump content to Authoring Space',
+ duco => 'Copying Content to Authoring Space',
yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.',
chos => 'Choose server',
);