--- loncom/interface/lonparmset.pm 2010/02/21 01:10:49 1.494
+++ loncom/interface/lonparmset.pm 2010/12/16 17:03:42 1.502
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.494 2010/02/21 01:10:49 raeburn Exp $
+# $Id: lonparmset.pm,v 1.502 2010/12/16 17:03:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1214,8 +1214,9 @@ sub isdateparm {
}
#
-# This function prints a list of parameters, which were selected. It also display a link from which you can
-# hide or show the complete parameter list, from which you can choose your parameters.
+# parmmenu displays a list of the selected parameters.
+# It also offers a link to show/hide the complete parameter list
+# from which you can select all desired parameters.
#
sub parmmenu {
my ($r,$allparms,$pscat,$keyorder)=@_;
@@ -1290,6 +1291,8 @@ sub parmmenu {
checkdates();
checkthis('weight','pscat');
checkthis('maxtries','pscat');
+ checkthis('type','pscat');
+ checkthis('problemstatus','pscat');
}
function hideParms() {
@@ -1319,7 +1322,7 @@ ENDSCRIPT
$r->print(&mt('Selected Parameters:').'
');
#print out all possible parms and hide them by default
- $r->print('
\n".&mt("Full Name").": ".
$name{'firstname'}.' '.$name{'middlename'}.' '
.$name{'lastname'}.' '.$name{'generation'}.
- "
\n".&mt('ID').": ".$name{'id'}.'
';
+ "
\n".&mt('Student/Employee ID').": ".$name{'id'}.'
';
}
@usersgroups = &Apache::lonnet::get_users_groups(
$udom,$uname,$env{'request.course.id'});
@@ -2080,10 +2116,10 @@ sub assessparms {
my @markers=split(/\&\&\&/,$env{'form.pres_marker'});
my @values=split(/\&\&\&/,$env{'form.pres_value'});
my @types=split(/\&\&\&/,$env{'form.pres_type'});
+ my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
for (my $i=0;$i<=$#markers;$i++) {
if ($markers[$i] =~ /^[\d.]+\&0_availablestudent\&(1|2|3)$/) {
- my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
- my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
my (@ok_slots,@fail_slots,@del_slots);
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom);
my ($level,@all) =
@@ -2113,6 +2149,10 @@ sub assessparms {
}
}
}
+ } elsif ($markers[$i] =~ /_type\&\d+$/) {
+ if (($values[$i] eq 'anonsurvey') || ($values[$i] eq 'anonsurveycred') || ($values[$i] eq 'randomizetry')) {
+ &Apache::lonnet::update_released_required($Apache::lonnet::needsrelease{'parameter:type:'.$values[$i]});
+ }
}
$message.=&storeparm(split(/\&/,$markers[$i]),
$values[$i],
@@ -2127,7 +2167,7 @@ sub assessparms {
}
#----------------------------------------------- if all selected, fill in array
if ($pscat[0] eq "all") {@pscat = (keys %allparms);}
- if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries') };
+ if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries','type','problemstatus') };
if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);}
# ------------------------------------------------------------------ Start page
@@ -2226,14 +2266,18 @@ COURSECONTENTSCRIPT
# parameter screen for a single resource.
my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb);
my $title = &Apache::lonnet::gettitle($pssymb);
- $r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource).
+ $r->print(&mt('Specific Resource: [_1] ([_2])',
+ $title,''.$resource.'').
''.
'
');
$r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)')));
$r->print(&Apache::lonhtmlcommon::start_pick_box());
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')).
- '$lt{'csv'}
+
($csuname $lt{'at'} $csudom)$lt{'csv'}
($csuname:$csudom)$lt{'ic'} $lt{'rl'}
$lt{'ic'}
@@ -2989,7 +3032,7 @@ sub date_interval_selector {
my %select = ((map {$_ => $_} (0..$max)),
'select_form_order' => [0..$max]);
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey,
- %select);
+ \%select);
$result .= ' '.&mt($name);
}
$result .= '';
@@ -3505,12 +3548,6 @@ ENDMAINFORMHEAD
linktitle => "Restrict metadata for this $lc_crstype." ,
icon =>'contact-new.png' ,
},
- { linktext => "Manage $crstype Slots",
- url => '/adm/slotrequest?command=showslots',
- permission => $vgr,
- linktitle => "Manage slots for this $lc_crstype." ,
- icon => 'rsrv.png' ,
- },
{ linktext => 'Reset Student Access Times',
url => '/adm/helper/resettimes.helper',
permission => $mgr,