--- loncom/interface/lonparmset.pm 2011/03/11 02:39:53 1.511 +++ loncom/interface/lonparmset.pm 2011/05/18 11:26:44 1.512 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.511 2011/03/11 02:39:53 www Exp $ +# $Id: lonparmset.pm,v 1.512 2011/05/18 11:26:44 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -137,33 +137,41 @@ javascript function 'pjump'. =item extractResourceInformation() : -Given the course data hash, extractResourceInformation extracts lots of information about the course's resources into a variety of hashes. + extractResourceInformation extracts lots of information about all of the the course's resources into a variety of hashes. Input: See list below: -=item * B : An array that will contain all of the ids in the course. +=item * B : Current username -=item * B : hash, id->type, where "type" contains the extension of the file, thus, I. +=item * B : Domain of current user. -=item * B : hash, id->key list, will contain a comma separated list of the meta-data keys available for the given id +=item * b : hash, name of parameter->display value (what is the display value?) +Outputs: See list below: -=item * B : hash, part identification->text representation of part, where the text representation is "[Part $part]" +=item * B (out) : An array that will contain all of the ids in the course. -=item * B : hash, full key to part->display value (what's display value?) +=item * B(out) : hash, id->type, where "type" contains the extension of the file, thus, I. -=item * B : hash, ??? +=item * B (out) : hash, id->key list, will contain a comma separated list of the meta-data keys available for the given id -=item * B : ??? +=item * B (out) : hash, name of parameter->display value (what is the display value?) -=item * B : hash, ??? +=item * B (out) : hash, part identification->text representation of part, where the text representation is "[Part $part]" + +=item * B (out) : hash, ??? =item * B : ?? =item * B : hash, id->full sym? +=item * B + +=item * B +=item * B + +=item * B =item isdateparm() @@ -1165,6 +1173,9 @@ sub extractResourceInformation { $$typep{$id}=$1; $$keyp{$id}=''; $$uris{$id}=$srcf; + &Apache::lonnet::logthis("Invoking metadata $srcf"); + &Apache::lonnet::logthis(&Apache::lonnet::metadata($srcf, 'allpossiblekeys')); + foreach my $key (split(/\,/,&Apache::lonnet::metadata($srcf,'allpossiblekeys'))) { next if ($key!~/^parameter_/); @@ -1353,6 +1364,8 @@ sub lookUpTableParameter { 'contentopen' => 'time_settings', 'contentclose' => 'time_settings', 'discussend' => 'time_settings', + 'printopendate' => 'time_settings', + 'printclosedate' => 'time_settings', 'weight' => 'grading', 'handgrade' => 'grading', 'maxtries' => 'tries', @@ -1932,7 +1945,9 @@ sub standardkeyorder { 'parameter_0_sig' => 17, 'parameter_0_turnoffunit' => 18, 'parameter_0_discussend' => 19, - 'parameter_0_discusshide' => 20); + 'parameter_0_discusshide' => 20, + 'parameter_0_printopendate' => 21, + 'parameter_0_printclosedate' => 22); } @@ -1940,6 +1955,9 @@ sub assessparms { my $r=shift; + + +# -------------------------------------------------------- Variable declaration my @ids=(); my %symbp=(); my %mapp=(); @@ -1947,9 +1965,6 @@ sub assessparms { my %keyp=(); my %uris=(); my %maptitles=(); - -# -------------------------------------------------------- Variable declaration - my %allmaps=(); my %alllevs=(); @@ -1968,14 +1983,16 @@ sub assessparms { my %allparms; my %allparts; +# ------------------------------------------------------------------------------ + # # Order in which these parameters will be displayed # my %keyorder=&standardkeyorder(); - @ids=(); - %symbp=(); - %typep=(); +# @ids=(); +# %symbp=(); # These seem defined above already. +# %typep=(); my $message=''; @@ -2097,6 +2114,8 @@ sub assessparms { my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; my ($got_chostname,$chostname,$cmajor,$cminor); my $totalstored = 0; + + for (my $i=0;$i<=$#markers;$i++) { my ($needsrelease,$needsnewer); if ($markers[$i] =~ /^[\d.]+\&0_availablestudent\&(1|2|3)$/) { @@ -2425,7 +2444,6 @@ ENDTABLEHEADFOUR my $uri=&Apache::lonnet::declutter($uris{$rid}); my $filter=$env{'form.filter'}; - foreach (&keysplit($keyp{$rid})) { my $tempkeyp = $_; if (grep $_ eq $tempkeyp, @catmarker) { @@ -2480,8 +2498,8 @@ ENDTABLEHEADFOUR $r->print(''.$maptitles{$mapp{$rid}}.''); - foreach (&keysinorder_bytype(\%name,\%keyorder)) { + unless ($firstrow) { $r->print(''); } else { @@ -3549,7 +3567,8 @@ sub date_shift_one { ''. '
'.&mt('Currently set date:').''. &Apache::lonlocal::locallocaltime($env{'form.timebase'}).'
'.&mt('Shifted date:').''. - &Apache::lonhtmlcommon::date_setter('shiftform', + &Apache::lonhtmlcommon::dshowerfuck.net +ate_setter('shiftform', 'timeshifted', $env{'form.timebase'},, '').