--- loncom/interface/londocs.pm 2007/07/18 18:36:52 1.278.2.3 +++ loncom/interface/londocs.pm 2007/06/29 20:14:18 1.279 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.278.2.3 2007/07/18 18:36:52 albertel Exp $ +# $Id: londocs.pm,v 1.279 2007/06/29 20:14:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -967,7 +967,6 @@ sub breadcrumbs { my $randompick=-1; my $isencrypted=0; my $ishidden=0; - my $is_random_order=0; while (@folders) { my $folder=shift(@folders); my $foldername=shift(@folders); @@ -977,7 +976,7 @@ sub breadcrumbs { &escape($folderpath); my $name=&unescape($foldername); # randompick number, hidden, encrypted is appended with ":"s to the foldername - $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)$//; + $name=~s/\:(\d*)\:(\w*)\:(\w*)$//; if ($1 ne '') { $randompick=$1; } else { @@ -985,7 +984,6 @@ sub breadcrumbs { } if ($2) { $ishidden=1; } if ($3) { $isencrypted=1; } - if ($4 ne '') { $is_random_order = 1; } &Apache::lonhtmlcommon::add_breadcrumb( {'href'=>$url.$cpinfo, 'title'=>$name, @@ -997,7 +995,7 @@ sub breadcrumbs { } $plain=~s/\>\;\s*$//; return (&Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'nohelp', - 'LC_docs_path'),$randompick,$ishidden,$isencrypted,$plain,$is_random_order); + 'LC_docs_path'),$randompick,$ishidden,$isencrypted,$plain); } sub log_docs { @@ -1088,7 +1086,6 @@ sub docs_change_log { my %lt=('hiddenresource' => 'Resources hidden', 'encrypturl' => 'URL hidden', 'randompick' => 'Randomly pick', - 'randomorder' => 'Randomly ordered', 'set' => 'set to', 'del' => 'deleted'); $r->print(&Apache::loncommon::display_filter(). @@ -1158,7 +1155,7 @@ sub docs_change_log { for (my $idx=0;$idx<=$docslog{$id}{'logentry'}{'maxidx'};$idx++) { my $oldname=(split(/\:/,$docslog{$id}{'logentry'}{'before_resources_'.$idx}))[0]; my $newname=(split(/\:/,$docslog{$id}{'logentry'}{'after_resources_'.$idx}))[0]; - if ($oldname ne $newname) { + if ($oldname ne '' && $oldname ne $newname) { $r->print(&LONCAPA::map::qtescape($newname)); } } @@ -1171,7 +1168,7 @@ sub docs_change_log { $r->print(''); if ($docslog{$id}{'logentry'}{'parameter_res'}) { $r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':
'.$errtext.'
'); @@ -1254,15 +1250,6 @@ sub editor { &remember_parms($idx,'encrypturl','del'); } } - if ($env{'form.changeparms'} eq 'randomorder') { - if ($env{'form.randorder_'.$idx}) { - &LONCAPA::map::storeparameter($idx,'parameter_randomorder','yes','string_yesno'); - &remember_parms($idx,'randomorder','set',$env{'form.randorder_'.$idx}); - } else { - &LONCAPA::map::delparameter($idx,'parameter_randomorder'); - &remember_parms($idx,'randomorder','del'); - } - } # store the changed version ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); if ($fatal) { @@ -1447,21 +1434,16 @@ sub editor { # ---------------------------------------------------------------- Print screen my $idx=0; my $shown=0; - if (($ishidden) || ($isencrypted) || ($randompick>=0) - || ($is_random_order)) { + if (($ishidden) || ($isencrypted) || ($randompick>=0)) { $r->print(''.&mt('Parameters').':
'.&mt('Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.').'
'); } - if ($is_random_order) { - $r->print(''.&mt('Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown. Do not modify the contents of this folder if it is in active student use.').'
'); - } $r->print('
|
-$rand_order_text | $parameterset | ENDPARMS }