--- loncom/interface/londocs.pm 2013/04/02 20:33:41 1.542
+++ loncom/interface/londocs.pm 2013/04/03 02:00:19 1.543
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.542 2013/04/02 20:33:41 raeburn Exp $
+# $Id: londocs.pm,v 1.543 2013/04/03 02:00:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2269,7 +2269,9 @@ sub update_parameter {
sub handle_edit_cmd {
my ($coursenum,$coursedom) =@_;
- return if ($env{'form.cmd'} eq '');
+ if ($env{'form.cmd'} eq '') {
+ return 0;
+ }
my ($cmd,$idx)=split('_',$env{'form.cmd'});
my $ratstr = $LONCAPA::map::resources[$LONCAPA::map::order[$idx]];
@@ -2597,9 +2599,13 @@ sub editor {
my ($to_show,$output,@allidx,@allmapidx,%filters,%lists,%curr_groups);
%filters = (
- canremove => [],
- cancut => [],
- cancopy => [],
+ canremove => [],
+ cancut => [],
+ cancopy => [],
+ hiddenresource => [],
+ encrypturl => [],
+ randomorder => [],
+ randompick => [],
);
%curr_groups = &Apache::longroup::coursegroups();
&Apache::loncommon::start_data_table_count(); #setup a row counter
@@ -2649,9 +2655,13 @@ sub editor {
if ($folder !~ /^supplemental/) {
$lists{'canhide'} = join(',',@allidx);
$lists{'canrandomlyorder'} = join(',',@allmapidx);
- foreach my $item ('canremove','cancut','cancopy') {
+ my @possfilters = ('canremove','cancut','cancopy','hiddenresource','encrypturl',
+ 'randomorder','randompick');
+ foreach my $item (@possfilters) {
if (ref($filters{$item}) eq 'ARRAY') {
- $lists{$item} = join(',',@{$filters{$item}});
+ if (@{$filters{$item}} > 0) {
+ $lists{$item} = join(',',@{$filters{$item}});
+ }
}
}
if (@allidx > 0) {
@@ -2773,7 +2783,11 @@ sub multiple_check_form {
'';
if ($caller eq 'settings') {
$output .=
- '';
+ ''."\n".
+ ''."\n".
+ ''."\n".
+ ''."\n".
+ ''."\n";
} elsif ($caller eq 'actions') {
$output .=
''.
@@ -3056,7 +3070,7 @@ END
}
if ($denied{'copy'}) {
- $copylink=(<$lt{'cp'}
ENDCOPY
} else {
@@ -3223,6 +3237,9 @@ 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 =
@@ -3235,8 +3252,13 @@ $form_common."\n".
}
$rand_pick_text .= ''.
$form_end;
- my $ro_set=
- ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':'');
+ 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);
+ }
+ }
my $formname = 'edit_rorder_'.$orderidx;
$rand_order_text =
'