--- loncom/interface/lonparmset.pm 2020/02/12 21:17:54 1.522.2.26.2.2
+++ loncom/interface/lonparmset.pm 2022/07/26 03:04:14 1.522.2.28.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.522.2.26.2.2 2020/02/12 21:17:54 raeburn Exp $
+# $Id: lonparmset.pm,v 1.522.2.28.2.2 2022/07/26 03:04:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -959,6 +959,7 @@ function validateParms() {
if (document.parmform.elements['set_'+identifier].value) {
possdeny = ','+possdeny;
}
+ document.parmform.elements['set_'+identifier].value += possdeny;
}
}
}
@@ -1213,9 +1214,7 @@ sub print_td {
$nolink = 1;
}
} elsif ($mprefix =~ /availablestudent\&$/) {
- if ($which > 3) {
- $nolink = 1;
- }
+ $nolink = 1;
} elsif ($mprefix =~ /examcode\&$/) {
unless ($which == 2) {
$nolink = 1;
@@ -2392,7 +2391,7 @@ sub assessparms {
if ($uname ne '') {
my %name=&Apache::lonnet::userenvironment($udom,$uname,
('firstname','middlename','lastname','generation','id'));
- $message .= "\n
\n".&mt('Full Name').': '
+ $message .= "\n
\n".&mt('Full Name').': '
.$name{'firstname'}.' '.$name{'middlename'}.' '
.$name{'lastname'}.' '.$name{'generation'}
."
\n".&mt('Student/Employee ID').': '.$name{'id'}.'
';
@@ -3378,6 +3377,8 @@ sub listdata {
($thiskey=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);
my $section=&mt('All Students');
$readonly = $readonlyall;
+ my $userscope;
+ my $showval = $$resourcedata{$thiskey};
if ($middle=~/^\[(.*)\]/) {
my $issection=$1;
if ($issection=~/^useropt\:($match_username)\:($match_domain)/) {
@@ -3390,6 +3391,7 @@ sub listdata {
}
}
$section=&mt('User').": ".&Apache::loncommon::plainname($1,$2);
+ $userscope = 1;
} else {
if (($env{'request.course.sec'} ne '') && ($caller eq 'overview')) {
if (exists($grouphash{$issection})) {
@@ -3454,8 +3456,13 @@ sub listdata {
''.&mt($parmitem).
' | ');
unless ($readonly) {
+ my $disabled;
+ if (($name eq 'availablestudent') &&
+ (($showval eq '') || ($userscope))) {
+ $disabled = ' disabled="disabled"';
+ }
$r->print(' | ');
+ $thiskey.'"'.$disabled.' />');
}
$r->print('');
$foundkeys++;
@@ -3483,6 +3490,9 @@ sub listdata {
$r->print(&date_interval_selector($thiskey,$name,
$$resourcedata{$thiskey},$readonly));
} elsif ($thistype =~ m/^string/) {
+ if ($name eq 'availablestudent') {
+ $readonly = 1;
+ }
$r->print(&string_selector($thistype,$thiskey,
$$resourcedata{$thiskey},$name,$readonly));
} else {
@@ -3905,6 +3915,8 @@ sub newoverview {
'.
&Apache::lonhtmlcommon::resize_scrollbox_js('params')."\n".
&showhide_js()."\n".
+ &validateparms_js()."\n".
+ &ipacc_boxes_js()."\n".
&done_proctor_js()."\n".
'// ]]>
@@ -3914,7 +3926,7 @@ sub newoverview {
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview');
$r->print($start_page.$breadcrumbs);
$r->print(<
+ |