--- loncom/interface/lonparmset.pm 2006/05/16 20:43:57 1.306 +++ loncom/interface/lonparmset.pm 2006/06/02 22:12:50 1.311 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.306 2006/05/16 20:43:57 albertel Exp $ +# $Id: lonparmset.pm,v 1.311 2006/06/02 22:12:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -63,7 +63,10 @@ use Apache::lonhomework; use Apache::lonxml; use Apache::lonlocal; use Apache::lonnavmaps; +use Apache::longroup; use Apache::lonrss; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; # --- Caches local to lonparmset @@ -1125,7 +1128,7 @@ sub usermenu { my %sectionhash = &Apache::loncommon::get_sections(); my $groups; - my %grouphash = &Apache::loncommon::coursegroups(); + my %grouphash = &Apache::longroup::coursegroups(); if (%sectionhash) { $sections=$lt{'se'}.': '); @@ -1731,7 +1734,7 @@ ENDTABLEHEADFOUR '

'. "$title"); @@ -3332,9 +3335,18 @@ sub standard_parameter_names { 'weight' => 'Weight', 'date_start' => 'Starting Date', 'date_end' => 'Ending Date', + 'interval' => 'Time Interval Length', + 'tol' => 'Numerical Tolerance', + 'sig' => 'Significant Digits', + 'contentopen' => 'Content Opening Date', + 'contentclose' => 'Content Closing Date', + 'discussend' => 'End of Discussion Time', + 'discusshide' => 'Discussion Hidden', + 'problemstatus' => 'Problem Status Visible', 'int_pos' => 'Positive Integer', 'int_zero_pos' => 'Positive Integer or Zero', - 'hinttries' => 'Number of Tries till Hints appear'); + 'hinttries' => 'Number of Tries till Hints appear', + 'numbubbles' => 'Number of Bubbles in Exam Mode'); if ($standard_parms{$name}) { return $standard_parms{$name}; } else { @@ -3342,20 +3354,46 @@ sub standard_parameter_names { } } +# +# Parameter Change Log +# + + sub parm_change_log { my ($r)=@_; &startpage($r); my %parmlog=&Apache::lonnet::dump('nohist_parameterlog', $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); + if ((keys(%parmlog))[0]=~/^error\:/) { undef(%parmlog); } + $r->print('

+ '); + + my %saveable_parameters = ('show' => 'scalar',); + &Apache::loncommon::store_course_settings('parameter_log', + \%saveable_parameters); + &Apache::loncommon::restore_course_settings('parameter_log', + \%saveable_parameters); + if (!$env{'form.show'}) { $env{'form.show'}=10; } + + my $countselect = + &Apache::lonmeta::selectbox('show',$env{'form.show'},undef, + (&mt('all'),10,20,50,100,1000,10000)); + + $r->print(''.&mt('[_1] Records',$countselect).''. + ''); + my $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'}, $env{'course.'.$env{'request.course.id'}.'.domain'}); $r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). ''.&mt('Time').''.&mt('User').''.&mt('Extent').''.&mt('Users').''. &mt('Parameter').''.&mt('Part').''.&mt('New Value').''.&mt('Announce').''. &Apache::loncommon::end_data_table_header_row()); + my $shown=0; foreach my $id (sort { $parmlog{$b}{'exe_time'}<=>$parmlog{$a}{'exe_time'} } (keys(%parmlog))) { my @changes=keys(%{$parmlog{$id}{'logentry'}}); my $count=$#changes+1; @@ -3433,8 +3471,12 @@ sub parm_change_log { } $r->print(&Apache::loncommon::end_data_table_row()); } + $shown++; + if (!($env{'form.show'} eq &mt('all') + || $shown<=$env{'form.show'})) { last; } } $r->print(&Apache::loncommon::end_data_table()); + $r->print(''); $r->print(&Apache::loncommon::end_page()); }