[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonuserutils.pm
raeburn
raeburn@source.lon-capa.org
Tue, 05 Jan 2010 22:08:48 -0000
raeburn Tue Jan 5 22:08:48 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface lonuserutils.pm
Log:
- Customization for GCI_3.
- Can only assign student role (or CC role -if course owner) for Concept Tests.
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.109.2.1 loncom/interface/lonuserutils.pm:1.109.2.2
--- loncom/interface/lonuserutils.pm:1.109.2.1 Sun Dec 20 01:53:42 2009
+++ loncom/interface/lonuserutils.pm Tue Jan 5 22:08:48 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.109.2.1 2009/12/20 01:53:42 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.109.2.2 2010/01/05 22:08:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1185,8 +1185,10 @@
'exs' => "Existing sections",
'new' => "New section",
);
- $options = '<select name="defaultrole">'."\n".
- ' <option value="">'.&mt('Please select').'</option>'."\n";
+ $options = '<select name="defaultrole">'."\n";
+ unless (($context eq 'course') && (&Apache::loncommon::needs_gci_custom())) {
+ $options .= ' <option value="">'.&mt('Please select').'</option>'."\n";
+ }
if ($context eq 'course') {
$options .= &default_course_roles($context,$checkpriv,$crstype,%customroles);
} elsif ($context eq 'author') {
@@ -5023,14 +5025,22 @@
if ($env{'request.role'} =~ m{^dc\./}) {
push(@allroles,'ad');
}
- push(@allroles,('ta','ep','in'));
- if ($crstype eq 'Community') {
- push(@allroles,'co');
+ if (&Apache::loncommon::needs_gci_custom()) {
+ if ($crstype eq 'Community') {
+ push(@allroles,'co');
+ } else {
+ push(@allroles,'cc');
+ }
} else {
- push(@allroles,'cc');
- }
- if ($custom) {
- push(@allroles,'cr');
+ push(@allroles,('ta','ep','in'));
+ if ($crstype eq 'Community') {
+ push(@allroles,'co');
+ } else {
+ push(@allroles,'cc');
+ }
+ if ($custom) {
+ push(@allroles,'cr');
+ }
}
} elsif ($context eq 'author') {
@allroles = ('ca','aa');