'
+ my $toolslink = ''
.&Apache::loncommon::help_open_menu('Navigation Screen',
'Navigation_Screen',undef,'RAT')
.' | '.&mt('Tools:').' | '
@@ -2964,7 +2603,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 +2618,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 +2662,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 +2675,7 @@ sub editor {
.'';
} else {
$to_show = ''
- .&mt('Currently empty')
+ .&mt('Currently no documents.')
.' '
}
}
@@ -3108,11 +2742,7 @@ sub multiple_check_form {
'';
if ($caller eq 'settings') {
$output .=
- ''."\n".
- ''."\n".
- ''."\n".
- ''."\n".
- ''."\n";
+ '';
} elsif ($caller eq 'actions') {
$output .=
''.
@@ -3126,30 +2756,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 +3025,7 @@ END
}
if ($denied{'copy'}) {
- $copylink=(<$lt{'cp'}
ENDCOPY
} else {
@@ -3426,7 +3034,7 @@ ENDCOPY
$copylink=(<
$form_common
-$lt{'cp'}
+$lt{'cp'}
$form_end
ENDCOPY
if (($ishash) && (ref($filtersref->{'cancopy'}) eq 'ARRAY')) {
@@ -3443,8 +3051,7 @@ ENDCUT
$cutlink=(<
$form_common
-
-$lt{'ct'}
+$lt{'ct'}
$form_end
ENDCUT
if (($ishash) && (ref($filtersref->{'cancut'}) eq 'ARRAY')) {
@@ -3461,17 +3068,18 @@ ENDREM
$removelink=(<
$form_common
-
-$lt{'rm'}
+$lt{'rm'}
$form_end
ENDREM
if (($ishash) && (ref($filtersref->{'canremove'}) eq 'ARRAY')) {
push(@{$filtersref->{'canremove'}},$orderidx);
}
}
- $renamelink=(<$lt{'rn'}
ENDREN
+ }
$line.=(<
@@ -3492,10 +3100,11 @@ ENDREN
$selectbox
$form_end
|
-
+ |
$removelink
$cutlink
$copylink
+
|
END
}
@@ -3582,9 +3191,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 +3203,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 =
'
NDBFORM
@@ -4999,7 +4589,7 @@ NEXUFORM
my $newbulform=(<
-
+
$pathitem
@@ -5009,7 +4599,7 @@ NBFORM
my $newaboutmeform=(<
-
+
$pathitem
@@ -5020,7 +4610,7 @@ NAMFORM
my $newaboutsomeoneform=(<
-
+
$pathitem
@@ -5029,12 +4619,12 @@ NASOFORM
my $newrosterform=(<
-
+
$pathitem
- $help{'Course_Roster'}
+ $help{'Course Roster'}
NROSTFORM
@@ -5050,11 +4640,11 @@ NROSTFORM
}
my $newwebpageform =(<
-
+
$pathitem
- $help{'Web_Page'}
+ $help{'Web Page'}
NWEBFORM
@@ -5074,7 +4664,7 @@ my $newfolderb;
@@ -5085,14 +4675,14 @@ NPFORM
NFFORM
my $newsylform=(<
-
+
$pathitem
@@ -5104,7 +4694,7 @@ NSYLFORM
my $newgroupfileform=(<
-
+
$pathitem
@@ -5131,7 +4721,7 @@ NGFFORM
);
}
push(@importdoc,
- {'
'=>$fileuploadform}
+ {'
'=>$fileuploadform}
);
$fileuploadform = &create_form_ul(&create_list_elements(@importdoc));
@@ -5153,14 +4743,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;
@@ -5221,7 +4811,7 @@ SUPDOCFORM
my $supnewfolderform=(<
-
+
$pathitem
@@ -5271,7 +4861,7 @@ SNAMFORM
$pathitem
- $help{'Web_Page'}
+ $help{'Web Page'}
SWEBFORM
@@ -5294,27 +4884,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) {
@@ -5463,7 +5040,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)) {
@@ -5498,13 +5075,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';
@@ -5586,7 +5163,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';
@@ -5594,7 +5171,7 @@ sub generate_edit_table {
$form = ''.
'
'."\n".
'- '.
- ''.
+ ''.
'
'.$backtext.' '."\n".
'- '.
@@ -5621,7 +5198,7 @@ sub generate_edit_table {
$form .= '
- '.&mt(${$orderhash{$name}}[0]).'
'."\n";
} else {
- $form .= '- '.${$orderhash{$name}}[1].'
'."\n";
+ $form .= '- '.${$orderhash{$name}}[1].'
'."\n";
}
}
@@ -5689,7 +5266,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',
@@ -5698,14 +5275,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',
@@ -5713,9 +5286,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();
@@ -5725,7 +5295,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;
@@ -5739,8 +5309,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') {
@@ -5803,7 +5371,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();
}
@@ -6075,78 +5643,69 @@ function propagateState(form,param) {
}
function checkForSubmit(targetform,param,context,idx,folderpath,index,oldtitle,skip_confirm,container,folder) {
- var dosettings;
- var doaction;
var control = document.togglemultsettings;
if (context == 'actions') {
control = document.togglemultactions;
- doaction = 1;
- } else {
- dosettings = 1;
}
- if (control) {
- if (control.showmultpick.length) {
- for (var i=0; i 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;
}
@@ -6625,9 +6109,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',
);