--- loncom/interface/londocs.pm 2006/11/13 17:20:29 1.251 +++ loncom/interface/londocs.pm 2006/11/22 14:07:13 1.256 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.251 2006/11/13 17:20:29 www Exp $ +# $Id: londocs.pm,v 1.256 2006/11/22 14:07:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1027,7 +1027,6 @@ sub log_docs { my ($plain)=@_; my %storehash=('folder' => $plain); if ($parmidx) { - $storehash{'parameter_idx'}=$parmidx; $storehash{'parameter_res'}=$oldresources[$parmidx]; foreach my $parm (keys %parmaction) { $storehash{'parameter_action_'.$parm}=$parmaction{$parm}; @@ -1045,10 +1044,8 @@ sub log_docs { $changedflag=1; } if ($LONCAPA::map::order[$idx] ne $oldorder[$idx]) { - $storehash{'before_order_'.$idx}=$oldorder[$idx]; - $storehash{'after_order_'.$idx}=$LONCAPA::map::order[$idx]; - $storehash{'before_order_res_'.$idx}=$oldresources[$idx]; - $storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$idx]; + $storehash{'before_order_res_'.$idx}=$oldresources[$oldorder[$idx]]; + $storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$LONCAPA::map::order[$idx]]; $changedflag=1; } } @@ -1065,27 +1062,32 @@ sub docs_change_log { my ($r)=@_; $r->print(&Apache::loncommon::start_page('Course Document Change Log')); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Document Change Log')); - + my %docslog=&Apache::lonnet::dump('nohist_docslog', $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); - + if ((keys(%docslog))[0]=~/^error\:/) { undef(%docslog); } - + $r->print('
'. ''); - + my %saveable_parameters = ('show' => 'scalar',); &Apache::loncommon::store_course_settings('docs_log', \%saveable_parameters); &Apache::loncommon::restore_course_settings('docs_log', \%saveable_parameters); if (!$env{'form.show'}) { $env{'form.show'}=10; } - + my %lt=('hiddenresource' => 'Resources hidden', + 'encrypturl' => 'URL hidden', + 'randompick' => 'Randomly pick', + 'set' => 'set to', + 'del' => 'deleted'); + my $countselect = &Apache::lonmeta::selectbox('show',$env{'form.show'},undef, (&mt('all'),10,20,50,100,1000,10000)); - + $r->print(''.&mt('[_1] Records',$countselect).''. '
'); $r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). @@ -1125,9 +1127,16 @@ sub docs_change_log { my $oldname=(split(/\:/,$docslog{$id}{'logentry'}{'before_resources_'.$idx}))[0]; my $newname=(split(/\:/,$docslog{$id}{'logentry'}{'after_resources_'.$idx}))[0]; if ($oldname ne $newname) { - $r->print(&LONCAPA::map::qtunescape($oldname)); + $r->print(&LONCAPA::map::qtescape($oldname)); } } + $r->print(''); # After $r->print(''); @@ -1135,9 +1144,28 @@ sub docs_change_log { my $oldname=(split(/\:/,$docslog{$id}{'logentry'}{'before_resources_'.$idx}))[0]; my $newname=(split(/\:/,$docslog{$id}{'logentry'}{'after_resources_'.$idx}))[0]; if ($oldname ne $newname) { - $r->print(&LONCAPA::map::qtunescape($newname)); + $r->print(&LONCAPA::map::qtescape($newname)); } } + $r->print(''); + if ($docslog{$id}{'logentry'}{'parameter_res'}) { + $r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':'); + } # End $r->print(''.&Apache::loncommon::end_data_table_row()); $shown++; @@ -2331,6 +2359,7 @@ sub handler { 'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages'); $help{'My Personal Info'} = &Apache::loncommon::help_open_topic( 'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); + $help{'Group Files'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files'); $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); # does this user have privileges to modify docs @@ -2525,6 +2554,7 @@ sub handler { 'scuf' => 'Score Upload Form', 'bull' => 'Bulletin Board', 'mypi' => 'My Personal Info', + 'grpo' => 'Group Files', 'abou' => 'About User', 'imsf' => 'Import IMS package', 'file' => 'File', @@ -2564,7 +2594,7 @@ sub handler { $containertag
- + $uploadtag
@@ -2678,7 +2708,7 @@ ENDFORM
$uploadtag - + $help{'Adding_External_Resource'} @@ -2696,7 +2726,7 @@ ENDFORM $r->print(< - + $help{'Adding_Fold
- + $help{'Adding_Page
$uploadtag - + $help{'Syllabus'} @@ -2723,8 +2753,8 @@ value="Syllabus=/public/$coursedom/$cour
$uploadtag - + $help{'Navigate_Content'} @@ -2732,7 +2762,7 @@ $help{'Navigate_Content'}
$uploadtag - + $help{'Simple Page'} @@ -2740,7 +2770,7 @@ onClick="javascript:makesmppage();" /> $
$uploadtag - + $help{'Simple Problem'} @@ -2748,7 +2778,7 @@ onClick="javascript:makesmpproblem();" /
$uploadtag - + @@ -2756,7 +2786,7 @@ onClick="javascript:makedropbox();" />
$uploadtag - + @@ -2765,7 +2795,7 @@ $help{'Score_Upload_Form'}
$uploadtag - + @@ -2774,8 +2804,8 @@ $help{'Bulletin Board'}
$uploadtag - + $help{'My Personal Info'} @@ -2783,19 +2813,28 @@ $help{'My Personal Info'}
$uploadtag - +
+
+$uploadtag + + + +$help{'Group Files'} + +
ENDFORM } if ($env{'form.pagepath'}) { $r->print(< $uploadtag - + $help{'Simple Problem'} @@ -2803,7 +2842,7 @@ onClick="javascript:makesmpproblem();" /
$uploadtag - + @@ -2867,7 +2906,7 @@ $lt{'comment'}:
- +
$help{'Adding_Fol
- + $help{'Adding_Ext
- + $help{'Syllabus'} @@ -2894,8 +2933,8 @@ $help{'Syllabus'}
- + $help{'My Personal Info'}