'
+ my $toolslink = ''
.&Apache::loncommon::help_open_menu('Navigation Screen',
'Navigation_Screen',undef,'RAT')
.' | '.&mt('Tools:').' | '
@@ -2964,7 +2605,6 @@ sub editor {
.'class="LC_toolbarItem" '
.'title="'.&mt('Supplemental Content Editor').'">'
.'
';
- }
if ($shown) {
if ($allowed) {
$to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')
@@ -2980,23 +2620,19 @@ sub editor {
if ($folder !~ /^supplemental/) {
$lists{'canhide'} = join(',',@allidx);
$lists{'canrandomlyorder'} = join(',',@allmapidx);
- my @possfilters = ('canremove','cancut','cancopy','hiddenresource','encrypturl',
- 'randomorder','randompick');
- foreach my $item (@possfilters) {
+ foreach my $item ('canremove','cancut','cancopy') {
if (ref($filters{$item}) eq 'ARRAY') {
- if (@{$filters{$item}} > 0) {
- $lists{$item} = join(',',@{$filters{$item}});
- }
+ $lists{$item} = join(',',@{$filters{$item}});
}
}
if (@allidx > 0) {
my $path;
if ($env{'form.folderpath'}) {
- $path =
+ $path =
&HTML::Entities::encode($env{'form.folderpath'},'<>&"');
}
if (@allidx > 1) {
- $to_show .=
+ $to_show .=
&Apache::loncommon::continue_data_table_row().
' | | '.
''.
@@ -3028,7 +2664,7 @@ sub editor {
}
$to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')
.' '
- .&mt('Currently empty')
+ .&mt('Currently no documents.')
.' '
.&Apache::loncommon::end_scrollbox();
}
@@ -3041,7 +2677,7 @@ sub editor {
.'';
} else {
$to_show = ''
- .&mt('Currently empty')
+ .&mt('Currently no documents.')
.' '
}
}
@@ -3108,11 +2744,7 @@ sub multiple_check_form {
'';
if ($caller eq 'settings') {
$output .=
- ''."\n".
- ''."\n".
- ''."\n".
- ''."\n".
- ''."\n";
+ '';
} elsif ($caller eq 'actions') {
$output .=
''.
@@ -3126,30 +2758,8 @@ sub multiple_check_form {
}
sub process_file_upload {
- my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd,$crstype) = @_;
+ my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd) = @_;
# upload a file, if present
- my $filesize = length($env{'form.uploaddoc'});
- if (!$filesize) {
- $$upload_output = ''.
- &mt('Unable to upload [_1]. (size = [_2] bytes)',
- ''.$env{'form.uploaddoc.filename'}.'',
- $filesize).' '.
- &mt('Either the file you attempted to upload was empty, or your web browser was unable to read its contents.').' '.
- ' ';
- return;
- }
- my $quotatype = 'unofficial';
- if ($crstype eq 'Community') {
- $quotatype = 'community';
- } elsif ($env{'course.'.$coursedom.'_'.$coursenum.'.internal.instcode'}) {
- $quotatype = 'official';
- }
- if (&Apache::loncommon::get_user_quota($coursenum,$coursedom,'course',$quotatype)) {
- $filesize = int($filesize/1000); #expressed in kb
- $$upload_output = &Apache::loncommon::excess_filesize_warning($coursenum,$coursedom,'course',
- $env{'form.uploaddoc.filename'},$filesize,'upload');
- return if ($$upload_output);
- }
my ($parseaction,$showupload,$nextphase,$mimetype);
if ($env{'form.parserflag'}) {
$parseaction = 'parse';
@@ -3417,7 +3027,7 @@ END
}
if ($denied{'copy'}) {
- $copylink=(<$lt{'cp'}
ENDCOPY
} else {
@@ -3443,7 +3053,6 @@ ENDCUT
$cutlink=(<
$form_common
-
$lt{'ct'}
$form_end
ENDCUT
@@ -3461,7 +3070,6 @@ ENDREM
$removelink=(<
$form_common
-
$lt{'rm'}
$form_end
ENDREM
@@ -3469,9 +3077,11 @@ ENDREM
push(@{$filtersref->{'canremove'}},$orderidx);
}
}
- $renamelink=(<$lt{'rn'}
ENDREN
+ }
$line.=(<
@@ -3582,9 +3192,6 @@ END
my $rpckchk;
if ($rpicknum) {
$rpckchk = ' checked="checked"';
- if (($ishash) && (ref($filtersref->{'randompick'}) eq 'ARRAY')) {
- push(@{$filtersref->{'randompick'}},$orderidx.':'.$rpicknum);
- }
}
my $formname = 'edit_randompick_'.$orderidx;
$rand_pick_text =
@@ -3597,20 +3204,15 @@ $form_common."\n".
}
$rand_pick_text .= ''.
$form_end;
- my $ro_set;
- if ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i) {
- $ro_set = 'checked="checked"';
- if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) {
- push(@{$filtersref->{'randomorder'}},$orderidx);
- }
- }
- $formname = 'edit_rorder_'.$orderidx;
+ my $ro_set=
+ ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':'');
+ my $formname = 'edit_rorder_'.$orderidx;
$rand_order_text =
' ';
}
@@ -3996,8 +3588,8 @@ sub list_symbs {
sub verifycontent {
my ($r) = @_;
my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
+ $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));
$r->print(&startContentScreen('tools'));
$r->print(''.&mt($crstype.' content verification').'');
$hashtied=0;
@@ -4033,8 +3625,8 @@ sub devalidateversioncache {
sub checkversions {
my ($r) = @_;
my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page("Check $crstype Resource Versions"));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Resource Versions"));
+ $r->print(&Apache::loncommon::start_page("Check $crstype Document Versions"));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Document Versions"));
$r->print(&startContentScreen('tools'));
my $header='';
@@ -4099,7 +3691,7 @@ sub checkversions {
&changewarning($r,'');
if ($env{'form.timerange'} eq 'all') {
# show all documents
- $header=&mt('All content in '.$crstype);
+ $header=&mt('All Documents in '.$crstype);
$allsel=' selected="selected"';
foreach my $key (keys(%hash)) {
if ($key=~/^ids\_(\/res\/.+)$/) {
@@ -4190,30 +3782,10 @@ $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').' | '.
@@ -4223,25 +3795,26 @@ ENDHEADERS
''.&mt('History').' | '.
&Apache::loncommon::end_data_table_header_row()
);
- 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')) {
+ 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')) {
if ($usedversion != $currentversion) {
$r->print(''.$usedversion.'');
} else {
@@ -4250,45 +3823,44 @@ 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(
+ $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(
- ' &').
- '" target="diffs">'.&mt('Diffs').'');
- }
- $r->print(' ');
+ .')');
+ if (&Apache::loncommon::fileembstyle($extension) eq 'ssi') {
+ $r->print(
+ ' &').
+ '" target="diffs">'.&mt('Diffs').'');
}
- $r->print(' | '.&Apache::loncommon::end_data_table_row());
+ $r->print(' ');
}
+ $r->print(' | '.&Apache::loncommon::end_data_table_row());
}
$r->print(
&Apache::loncommon::end_data_table().
@@ -4298,7 +3870,6 @@ ENDHEADERS
&untiehash();
$r->print(&endContentScreen());
- return;
}
sub mark_hash_old {
@@ -4353,13 +3924,13 @@ $help{'Caching'}.''."\n\n");
sub init_breadcrumbs {
- my ($form,$text,$help)=@_;
+ my ($form,$text)=@_;
&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 => $help});
+ help => 'Docs_Adding_Course_Doc'});
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs?".$form.'=1',
text=>$text,
faq=>273,
@@ -4395,9 +3966,10 @@ sub startContentScreen {
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) {
$output .= ' '.&mt('Content Overview').' '."\n";
$output .= ' '.&mt('Content Search').' '."\n";
+ $output .= ' '.&mt('Content Index').' '."\n";
$output .= ''.&mt('Supplemental Content').'';
} else {
- $output .= ' '.&mt('Main Content Editor').' '."\n";
+ $output .= ' '.&mt('Content Editor').' '."\n";
$output .= ''.&mt('Supplemental Content Editor').''."\n";
$output .= ' '.&mt('Content Utilities').' '."\n";
'> '.&mt('Content Utilities').' ';
@@ -4418,7 +3990,7 @@ sub endContentScreen {
}
sub supplemental_base {
- return 'supplemental&'.&escape(&mt('Supplemental Content'));
+ return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content'));
}
sub handler {
@@ -4442,8 +4014,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','Course_Roster','Web_Page',
- 'Dropbox','Simple_Problem') {
+ 'Uploading_From_Harddrive',
+ 'Check_Resource_Versions','Verify_Content') {
$help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);
}
# Composite help files
@@ -4451,12 +4023,16 @@ 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.
@@ -4471,7 +4047,7 @@ sub handler {
&choose_dump_server($r);
return OK;
} elsif ($allowed && $env{'form.verify'}) {
- &init_breadcrumbs('verify','Verify Content','Docs_Verify_Content');
+ &init_breadcrumbs('verify','Verify Content');
&verifycontent($r);
} elsif ($allowed && $env{'form.listsymbs'}) {
&init_breadcrumbs('listsymbs','List Content IDs');
@@ -4484,10 +4060,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','Docs_Check_Resource_Versions');
+ &init_breadcrumbs('versions','Check/Set Resource Versions');
&checkversions($r);
} elsif ($allowed && $env{'form.dumpcourse'}) {
- &init_breadcrumbs('dumpcourse','Copy '.&Apache::loncommon::course_type().' Content to Authoring Space');
+ &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Content to Authoring Space');
&dumpcourse($r);
} elsif ($allowed && $env{'form.exportcourse'}) {
&init_breadcrumbs('exportcourse','IMS Export');
@@ -4513,9 +4089,9 @@ sub handler {
# supplementalflag=0: show standard documents
# toolsflag=1: show utilities
- my $unesc_folderpath = &unescape($env{'form.folderpath'});
- my $supplementalflag=($unesc_folderpath=~/^supplemental/);
- if (($unesc_folderpath=~/^default/) || ($unesc_folderpath eq "")) {
+ $env{'form.folderpath'} = &unescape($env{'form.folderpath'});
+ my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/);
+ if (($env{'form.folderpath'}=~/^default/) || ($env{'form.folderpath'} eq "")) {
$supplementalflag=0;
}
if ($env{'form.forcesupplement'}) { $supplementalflag=1; }
@@ -4547,7 +4123,7 @@ sub handler {
}
} elsif ($env{'form.command'} eq 'editdocs') {
$env{'form.folderpath'} = 'default&'.
- &escape(&mt('Main Content').':::::');
+ &escape(&mt('Main '.$crstype.' Content').':::::');
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});
} elsif ($env{'form.command'} eq 'editsupp') {
$env{'form.folderpath'} = 'supplemental&'.
@@ -4592,7 +4168,7 @@ sub handler {
if ($supplementalflag) {
$env{'form.folderpath'}=&supplemental_base();
} else {
- $env{'form.folderpath'}='default&'.&escape(&mt('Main Content').
+ $env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content').
':::::');
}
}
@@ -4618,7 +4194,7 @@ sub handler {
if ($env{'form.folder'} eq '' ||
$env{'form.folder'} eq 'supplemental') {
$folderpath='default&'.
- &escape(&mt('Main Content').':::::');
+ &escape(&mt('Main '.$crstype.' Content').':::::');
}
}
$containertag = '';
@@ -4655,11 +4231,9 @@ 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$/) {
@@ -4671,7 +4245,7 @@ sub handler {
$script .= &editing_js($udom,$uname,$supplementalflag).
&history_tab_js().
&inject_data_js().
- &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid).
+ &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr).
&Apache::lonextresedit::extedit_javascript();
$addentries = {
onload => "javascript:resize_scrollbox('contentscroll','1','1');",
@@ -4696,14 +4270,6 @@ 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,
@@ -4731,7 +4297,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,$crstype);
+ \%allfiles,\%codebase,$context);
if ($hadchanges) {
&mark_hash_old();
}
@@ -4783,7 +4349,7 @@ sub handler {
my %lt=&Apache::lonlocal::texthash(
'copm' => 'All documents out of a published map into this folder',
'upfi' => 'Upload File',
- 'upld' => 'Upload Content',
+ 'upld' => 'Import Content',
'srch' => 'Search',
'impo' => 'Import',
'lnks' => 'Import from Stored Links',
@@ -4796,7 +4362,7 @@ sub handler {
'navc' => 'Table of Contents',
'sipa' => 'Simple Course Page',
'sipr' => 'Simple Problem',
- 'webp' => 'Blank Web Page (editable)',
+ 'webp' => 'Blank Web Page (editable)',
'drbx' => 'Drop Box',
'scuf' => 'External Scores (handgrade, upload, clicker)',
'bull' => 'Discussion Board',
@@ -4804,8 +4370,8 @@ sub handler {
'grpo' => 'Group Portfolio',
'rost' => 'Course Roster',
'abou' => 'Personal Information Page for a User',
- 'imsf' => 'IMS Upload',
- 'imsl' => 'Upload IMS package',
+ 'imsf' => 'IMS Import',
+ 'imsl' => 'Import IMS package',
'cms' => 'Origin of IMS package',
'se' => 'Select',
'file' => 'File',
@@ -4953,7 +4519,7 @@ HIDDENFORM
if ($folder eq '' || $supplementalflag) {
$folder='default';
$savefolderpath = $env{'form.folderpath'};
- $env{'form.folderpath'}='default&'.&escape(&mt('Main Content'));
+ $env{'form.folderpath'}='default&'.&escape(&mt('Content'));
$pathitem = '';
}
@@ -4974,7 +4540,7 @@ HIDDENFORM
my $newnavform=(<
-
+
$pathitem
@@ -4984,7 +4550,7 @@ HIDDENFORM
NNFORM
my $newsmppageform=(<
-
+
$pathitem
@@ -4998,7 +4564,7 @@ NSPFORM
$pathitem
- $help{'Simple_Problem'}
+ $help{'Simple Problem'}
NSPROBFORM
@@ -5009,7 +4575,6 @@ NSPROBFORM
$pathitem
- $help{'Dropbox'}
NDBFORM
@@ -5025,7 +4590,7 @@ NEXUFORM
my $newbulform=(<
-
+
$pathitem
@@ -5035,7 +4600,7 @@ NBFORM
my $newaboutmeform=(<
-
+
$pathitem
@@ -5046,7 +4611,7 @@ NAMFORM
my $newaboutsomeoneform=(<
-
+
$pathitem
@@ -5055,12 +4620,12 @@ NASOFORM
my $newrosterform=(<
-
+
$pathitem
- $help{'Course_Roster'}
+ $help{'Course Roster'}
NROSTFORM
@@ -5076,11 +4641,11 @@ NROSTFORM
}
my $newwebpageform =(<
-
+
$pathitem
- $help{'Web_Page'}
+ $help{'Web Page'}
NWEBFORM
@@ -5100,7 +4665,7 @@ my $newfolderb;
@@ -5111,14 +4676,14 @@ NPFORM
NFFORM
my $newsylform=(<
-
+
$pathitem
@@ -5130,7 +4695,7 @@ NSYLFORM
my $newgroupfileform=(<
-
+
$pathitem
@@ -5157,7 +4722,7 @@ NGFFORM
);
}
push(@importdoc,
- {'
'=>$fileuploadform}
+ {'
'=>$fileuploadform}
);
$fileuploadform = &create_form_ul(&create_list_elements(@importdoc));
@@ -5179,14 +4744,14 @@ NGFFORM
$communityform = &create_form_ul(&create_list_elements(@communityforma));
my %orderhash = (
- 'aa' => ['Upload',$fileuploadform],
- 'bb' => ['Import',$importpubform],
- 'cc' => ['Grading',$gradingform],
+ 'aa' => ['Import Content',$fileuploadform],
+ 'bb' => ['Published Content',$importpubform],
+ 'cc' => ['Grading Resources',$gradingform],
);
unless ($container eq 'page') {
$orderhash{'00'} = ['Newfolder',$newfolderform];
$orderhash{'dd'} = ['Collaboration',$communityform];
- $orderhash{'ee'} = ['Other',$specialdocumentsform];
+ $orderhash{'ee'} = ['Special Pages',$specialdocumentsform];
}
$hadchanges=0;
@@ -5247,7 +4812,7 @@ SUPDOCFORM
my $supnewfolderform=(<
-
+
$pathitem
@@ -5297,7 +4862,7 @@ SNAMFORM
$pathitem
- $help{'Web_Page'}
+ $help{'Web Page'}
SWEBFORM
@@ -5320,27 +4885,14 @@ my @supimportdoc = (
$supupdocform = &create_form_ul(&create_list_elements(@supimportdoc));
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
- 'ee' => ['Upload',$supupdocform],
- 'ff' => ['Other',&create_form_ul(&create_list_elements(@specialdocs))]
+ 'ee' => ['Import Content',$supupdocform],
+ 'ff' => ['Special Pages',&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) {
@@ -5489,7 +5041,7 @@ sub remove_archive {
my $currcmd = $env{'form.cmd'};
my $position = $env{'form.position'};
if ($position > 0) {
- $env{'form.cmd'} = 'remove_'.$position;
+ $env{'form.cmd'} = 'del_'.$position;
my ($title,$url,@rrest) =
split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);
if (&handle_edit_cmd($docuname,$docudom)) {
@@ -5524,13 +5076,13 @@ sub generate_admin_menu {
my ($crstype) = @_;
my $lc_crstype = lc($crstype);
my ($home,$other,%outhash)=&authorhosts();
- my %lt= ( # do not translate here
+ my %lt=&Apache::lonlocal::texthash (
'vc' => 'Verify Content',
'cv' => 'Check/Set Resource Versions',
'ls' => 'List Resource Identifiers',
'imse' => 'Export contents to IMS Archive',
- 'dcd' => "Copy $crstype Content to Authoring Space",
- );
+ 'dcd' => "Dump $crstype Content to Authoring Space",
+ );
my ($candump,$dumpurl);
if ($home + $other > 0) {
$candump = 'F';
@@ -5560,14 +5112,14 @@ sub generate_admin_menu {
{ linktext => $lt{'vc'},
url => "javascript:injectData(document.courseverify,'dummy','verify','$lt{'vc'}')",
permission => 'F',
- help => 'Docs_Verify_Content',
+ help => '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 => 'Docs_Check_Resource_Versions',
+ help => 'Check_Resource_Versions',
icon => 'resversion.png',
linktitle => "View version information for resources in your $lc_crstype, and fix/unfix use of specific versions",
},
@@ -5592,7 +5144,7 @@ sub generate_admin_menu {
{ linktext => $lt{'dcd'},
url => $dumpurl,
permission => $candump,
- help => 'Docs_Dump_Course_Docs',
+ #help => '',
icon => 'dump.png',
linktitle => $lt{'dcd'},
},
@@ -5612,7 +5164,7 @@ sub generate_edit_table {
my $form;
my $activetab;
my $active;
- if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) {
+ if (($env{'form.active'} ne '') && ($env{'form.active'} ne 'aa')) {
$activetab = $env{'form.active'};
}
my $backicon = $iconpath.'clickhere.gif';
@@ -5620,7 +5172,7 @@ sub generate_edit_table {
$form = ''.
'
'."\n".
'- '.
- ''.
+ ''.
'
'.$backtext.' '."\n".
'- '.
@@ -5647,7 +5199,7 @@ sub generate_edit_table {
$form .= '
- '.&mt(${$orderhash{$name}}[0]).'
'."\n";
} else {
- $form .= '- '.${$orderhash{$name}}[1].'
'."\n";
+ $form .= '- '.${$orderhash{$name}}[1].'
'."\n";
}
}
@@ -5715,7 +5267,7 @@ sub editing_js {
p_msb => 'Title for the Problem',
p_mdb => 'Title for the Drop Box',
p_mbb => 'Title for the Discussion Board',
- p_mwp => 'Title for Web Page',
+ p_mwp => 'Title for Web Page',
p_mab => "Enter user:domain for User's Personal Information Page",
p_mab2 => 'Personal Information Page of ',
p_mab_alrt1 => 'Not a valid user:domain',
@@ -5724,14 +5276,10 @@ sub editing_js {
p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!',
p_rmr2a => 'Remove[_99]',
p_rmr2b => '?[_99]',
- p_rmr3a => 'Remove those [_2]',
- p_rmr3b => 'items?[_2]',
p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!',
p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.',
p_ctr2a => 'Cut[_98]',
p_ctr2b => '?[_98]',
- p_ctr3a => 'Cut those[_2]',
- p_ctr3b => 'items?[_2]',
rpck => 'Enter number to pick (e.g., 3)',
imsfile => 'You must choose an IMS package for import',
imscms => 'You must select which Course Management System was the source of the IMS package',
@@ -5739,9 +5287,6 @@ sub editing_js {
titbl => 'Title is blank',
more => '(More ...)',
less => '(Less ...)',
- noor => 'No actions selected or changes to settings specified.',
- noch => 'No changes to settings specified.',
- noac => 'No actions selected.',
);
my $crstype = &Apache::loncommon::course_type();
@@ -5751,7 +5296,7 @@ sub editing_js {
$main_container_page = 1;
}
my $toplevelmain =
- &escape(&mt('Main Content').':::::');
+ &escape(&mt('Main '.$crstype.' Content').':::::');
my $toplevelsupp = &supplemental_base();
my $backtourl;
@@ -5765,8 +5310,6 @@ sub editing_js {
if (&Apache::lonnet::is_on_map($res)) {
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='.
&HTML::Entities::encode($caller,'<>&"');
- } else {
- $backtourl = '/adm/navmaps';
}
}
} elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') {
@@ -5829,7 +5372,7 @@ function makewebpage(type) {
formname = this.document.forms.newwebpage;
}
if (title) {
- var webpage = formname.importdetail.value;
+ var webpage = formname.importdetail.value;
formname.importdetail.value = escape(title)+'='+webpage;
formname.submit();
}
@@ -6210,12 +5753,10 @@ for (i = 0; i < currentLis.length; i++)
function hideAll(current, nav, data) {
unselectInactive(nav);
-if (current) {
- if (current.className == 'right'){
+if(current.className == 'right'){
current.className = 'right active'
- } else {
+ }else{
current.className = 'active';
- }
}
currentData = document.getElementById(data);
currentDivs = currentData.getElementsByTagName('DIV');
@@ -6246,24 +5787,10 @@ function openTabs(pageId) {
}
function showPage(current, pageId, nav, data) {
- currstate = current.className;
hideAll(current, nav, data);
openTabs(pageId);
unselectInactive(nav);
- 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';
- }
+ current.className = 'active';
currentData = document.getElementById(pageId);
currentData.style.display = 'block';
activeTab = pageId;
@@ -6393,8 +5920,6 @@ function checkSubmits() {
var numchanges = 0;
var form = document.saveactions;
var doactions = multiActions();
- var cutwarnings = 0;
- var remwarnings = 0;
if (doactions == 1) {
var remidxlist = document.cumulativeactions.allremoveidx.value;
if ((remidxlist != '') && (remidxlist != null)) {
@@ -6404,11 +5929,6 @@ function checkSubmits() {
if (document.getElementById('remove_'+remidxs[i]).checked) {
form.multiremove.value += remidxs[i]+',';
numchanges ++;
- if (document.getElementById('skip_remove_'+remidxs[i])) {
- if (document.getElementById('skip_remove_'+remidxs[i]).value == 0) {
- remwarnings ++;
- }
- }
}
}
}
@@ -6421,11 +5941,6 @@ function checkSubmits() {
if (document.getElementById('cut_'+cutidxs[i]).checked == true) {
form.multicut.value += cutidxs[i]+',';
numchanges ++;
- if (document.getElementById('skip_cut_'+cutidxs[i])) {
- if (document.getElementById('skip_cut_'+cutidxs[i]).value == 0) {
- cutwarnings ++;
- }
- }
}
}
}
@@ -6447,12 +5962,10 @@ function checkSubmits() {
}
}
var dosettings = multiSettings();
- var haschanges = 0;
if (dosettings == 1) {
form.allencrypturl.value = '';
form.allhiddenresource.value = '';
- form.changeparms.value = 'all';
- var patt=new RegExp(",\$");
+ form.changeparms.value = 'all';
var allidxlist = document.cumulativesettings.allidx.value;
if ((allidxlist != '') && (allidxlist != null)) {
var allidxs = allidxlist.split(',');
@@ -6469,8 +5982,6 @@ function checkSubmits() {
}
}
}
- form.allhiddenresource.value = form.allhiddenresource.value.replace(patt,"");
- form.allencrypturl.value = form.allencrypturl.value.replace(patt,"");
}
}
form.allrandompick.value = '';
@@ -6489,55 +6000,12 @@ function checkSubmits() {
form.allrandomorder.value += allmapidxs[i]+',';
}
}
- form.allrandompick.value = form.allrandompick.value.replace(patt,"");
- form.allrandomorder.value = form.allrandomorder.value.replace(patt,"");
- }
- if (document.cumulativesettings.currhiddenresource.value != form.allhiddenresource.value) {
- haschanges = 1;
- }
- if (document.cumulativesettings.currencrypturl.value != form.allencrypturl.value) {
- haschanges = 1;
- }
- if (document.cumulativesettings.currrandomorder.value != form.allrandomorder.value) {
- haschanges = 1;
- }
- if (document.cumulativesettings.currrandompick.value != form.allrandompick.value) {
- haschanges = 1;
- }
- }
- if (doactions == 1) {
- if (numchanges > 0) {
- if ((cutwarnings > 0) || (remwarnings > 0)) {
- if (remwarnings > 0) {
- if (!confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr3a"} '+remwarnings+' $lt{"p_rmr3b"}')) {
- return false;
- }
- }
- if (cutwarnings > 0) {
- if (!confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr3a"} '+cutwarnings+' $lt{"p_ctr3b"}')) {
- return false;
- }
- }
- }
- form.submit();
- return true;
- }
- }
- if (dosettings == 1) {
- if (haschanges == 1) {
- form.submit();
- return true;
- }
- }
- if ((dosettings == 1) && (doactions == 1)) {
- alert("$lt{'noor'}");
- } else {
- if (dosettings == 1) {
- alert("$lt{'noch'}");
- } else {
- alert("$lt{'noac'}");
}
}
+ if ((numchanges > 0) || (dosettings == 1)) {
+ form.submit();
+ return true;
+ }
return false;
}
@@ -6651,9 +6119,9 @@ ENDINJECT
sub dump_switchserver_js {
my @hosts = @_;
my %lt = &Apache::lonlocal::texthash(
- dump => 'Copying Content to Authoring Space requires switching server.',
+ dump => 'Dumping to Authoring Space requires switching server.',
swit => 'Switch server?',
- duco => 'Copying Content to Authoring Space',
+ duco => 'Dump 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',
);