[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm lonparmset.pm /lonnet/perl lonnet.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 02 Feb 2004 20:21:25 -0000
www Mon Feb 2 15:21:25 2004 EDT
Modified files:
/loncom/interface loncreatecourse.pm lonparmset.pm
/loncom/lonnet/perl lonnet.pm
Log:
* Making it part of the course environment which privileged users (DC, CC)
should NOT be hidden from the staff listings on syllabi, etc
* Automatically make the chosen Course Coordinator non-hidden
* Removing the &mt from grading options "standard" and "external" - the
value of the setting cannot be language dependent, since if for a example
a user sets it to the German translation of "standard" a user with Spanish
language setting would see the wrong grading
* invented new option "spreadsheet," just to have one
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.48 loncom/interface/loncreatecourse.pm:1.49
--- loncom/interface/loncreatecourse.pm:1.48 Fri Jan 30 21:07:53 2004
+++ loncom/interface/loncreatecourse.pm Mon Feb 2 15:21:25 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.48 2004/01/31 02:07:53 www Exp $
+# $Id: loncreatecourse.pm,v 1.49 2004/02/02 20:21:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -564,6 +564,9 @@
}
}
}
+# do not hide course coordinator from staff listing,
+# even if privileged
+ $cenv{'nothideprivileged'}=$ccuname.':'.$ccdomain;
if ($ENV{'form.crsxlist'}) {
$cenv{'internal.crosslistings'}=$ENV{'form.crsxlist'};
my @xlists = ();
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.149 loncom/interface/lonparmset.pm:1.150
--- loncom/interface/lonparmset.pm:1.149 Wed Jan 28 12:16:27 2004
+++ loncom/interface/lonparmset.pm Mon Feb 2 15:21:25 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.149 2004/01/28 17:16:27 albertel Exp $
+# $Id: lonparmset.pm,v 1.150 2004/02/02 20:21:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1529,11 +1529,8 @@
'courseid' => '<b>'.&mt('Course ID').' '.&mt('or').' '.&mt('number').
'</b><br />'.
'('.&mt('internal').', '.&mt('optional').')',
- 'grading' => '<b>'.&mt('Grading').'</b>'.
- ' "'.&mt('standard').'", "'.&mt('external').'", '.
- &mt('or any other value').'.'.
- ' '.&mt('Default for new courses is').' "'.
- &mt('standard').'".',
+ 'grading' => '<b>'.&mt('Grading').'</b><br />'.
+ '<tt>"standard", "external", or "spreadsheet"</tt> '.&Apache::loncommon::help_open_topic('GradingOptions'),
'default_xml_style' => '<b>'.&mt('Default XML Style File').'</b> '.
'<a href="javascript:openbrowser'.
"('envform','default_xml_style'".
@@ -1596,10 +1593,12 @@
=> '<b>'.&mt('Allow problems to be split over pages').'</b><br />'.
' ("<tt>'.&mt('yes').'</tt>" '.&mt('if allowed, anything else if not').')',
'anonymous_quiz'
- => '<b>'.&mt('Anonimous quiz/exam').'</b><br />'.
+ => '<b>'.&mt('Anonymous quiz/exam').'</b><br />'.
' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)',
'default_enrollment_start_date' => '<b>'.&mt('Default beginning date when enrolling students').'</b>',
'default_enrollment_end_date' => '<b>'.&mt('Default ending date when enrolling students').'</b>',
+ 'nothideprivileged' => '<b>'.&mt('Privileged users that should not be hidden on staff listings').'</b>'.
+ '<br />(<tt>user:domain,user:domain,...</tt>)',
'languages' => '<b>'.&mt('Languages used').'</b>',
'disable_receipt_display'
=> '<b>'.&mt('Disable display of problem receipts').'</b><br />'.
@@ -1614,6 +1613,7 @@
'pch.roles.denied','pch.users.denied',
'allow_limited_html_in_feedback',
'languages',
+ 'nothideprivileged',
'rndseed',
'problem_stream_switch',
'disable_receipt_display',
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.469 loncom/lonnet/perl/lonnet.pm:1.470
--- loncom/lonnet/perl/lonnet.pm:1.469 Fri Jan 30 20:03:56 2004
+++ loncom/lonnet/perl/lonnet.pm Mon Feb 2 15:21:25 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.469 2004/01/31 01:03:56 www Exp $
+# $Id: lonnet.pm,v 1.470 2004/02/02 20:21:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1436,6 +1436,10 @@
my $cid=shift;
$cid=$ENV{'request.course.id'} unless (defined($cid));
my %coursehash=&coursedescription($cid);
+ my %nothide=();
+ foreach (split(/\s*\,\s*/,$coursehash{'nothideprivileged'})) {
+ $nothide{join(':',split(/[\@\:]/,$_))}=1;
+ }
my %returnhash=();
my %dumphash=
&dump('nohist_userroles',$coursehash{'domain'},$coursehash{'num'});
@@ -1446,7 +1450,8 @@
if (($tend) && ($tend<$now)) { next; }
if (($tstart) && ($now<$tstart)) { next; }
my ($role,$username,$domain,$section)=split(/\:/,$_);
- if (&privileged($username,$domain)) { next; }
+ if ((&privileged($username,$domain)) &&
+ (!$nothide{$username.':'.$domain})) { next; }
my $key=&plaintext($role);
if ($section) { $key.=' (Sec/Grp '.$section.')'; }
if ($returnhash{$key}) {