[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Fri, 29 Dec 2006 18:41:43 -0000
raeburn Fri Dec 29 13:41:43 2006 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
Type selector Course vs. Non-standard course eliminated from CUSR for Domain Coordinators. Originally put there to change role names depending on context. This should actually occur after a choice has been made in pickcourse of specific course/non-standard course so course-configured role names are used. (Similar to sections). 2.4 target.
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.142 loncom/interface/loncreateuser.pm:1.143
--- loncom/interface/loncreateuser.pm:1.142 Thu Dec 21 16:40:28 2006
+++ loncom/interface/loncreateuser.pm Fri Dec 29 13:41:43 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.142 2006/12/21 21:40:28 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.143 2006/12/29 18:41:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -358,36 +358,6 @@
}
return -1;
}
-
- function setType() {
- var crstype = document.cu.crstype.options[document.cu.crstype.selectedIndex].value;
- rolevals = new Array("$rolevalslist");
- if (crstype == 'Group') {
- if (document.cu.currsec.options[0].text == "$pickcrsfirst") {
- document.cu.currsec.options[0].text = "$pickgrpfirst";
- }
- grprolenames = new Array("$grprolenameslist");
- for (var i=0; i<rolevals.length; i++) {
- if (document.cu.role.selectedIndex == i) {
- document.cu.role.options[i] = new Option(grprolenames[i],rolevals[i],true,false);
- } else {
- document.cu.role.options[i] = new Option(grprolenames[i],rolevals[i],false,false);
- }
- }
- } else {
- if (document.cu.currsec.options[0].text == "$pickgrpfirst") {
- document.cu.currsec.options[0].text = "$pickcrsfirst";
- }
- crsrolenames = new Array("$crsrolenameslist");
- for (var i=0; i<rolevals.length; i++) {
- if (document.cu.role.selectedIndex == i) {
- document.cu.role.options[i] = new Option(crsrolenames[i],rolevals[i],true,false);
- } else {
- document.cu.role.options[i] = new Option(crsrolenames[i],rolevals[i],false,false);
- }
- }
- }
- }
ENDSCRIPT
} else {
$nondc_setsection_code = <<"ENDSECCODE";
@@ -1887,7 +1857,6 @@
('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>';
my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu');
my %lt=&Apache::lonlocal::texthash(
- 'typ' => "Type",
'rol' => "Role",
'grs' => "Section",
'exs' => "Existing sections",
@@ -1900,14 +1869,9 @@
my $header = '<h4>'.&mt('Course Level').'</h4>'.
&Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
- '<th>'.$lt{'typ'}.'</th><th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
+ '<th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
&Apache::loncommon::end_data_table_header_row();
- my $otheritems = &Apache::loncommon::start_data_table_row().
- '<td><select name="crstype" onChange="javascript:setType();">'."\n".
- ' <option value="">'.&mt('Please select')."\n".
- ' <option value="Course">'.&mt('Course')."\n".
- ' <option value="Non-standard course">'.&mt('Non-standard course')."\n".
- '</select>'."\n".
+ my $otheritems = &Apache::loncommon::start_data_table_row()."\n".
'<td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',''".')" /></td>'."\n".
'<td><select name="role">'."\n";
foreach my $role ('st','ta','ep','in','cc') {