version 1.142, 2006/12/21 21:40:28
|
version 1.144, 2007/01/16 19:56:41
|
Line 358 sub print_user_modification_page {
|
Line 358 sub print_user_modification_page {
|
} |
} |
return -1; |
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 |
ENDSCRIPT |
} else { |
} else { |
$nondc_setsection_code = <<"ENDSECCODE"; |
$nondc_setsection_code = <<"ENDSECCODE"; |
Line 1868 sub course_sections {
|
Line 1838 sub course_sections {
|
$output = '<select name="currsec_'.$role.'" '; |
$output = '<select name="currsec_'.$role.'" '; |
my $multiple = 4; |
my $multiple = 4; |
if (scalar(@sections) < 4) { $multiple = scalar(@sections); } |
if (scalar(@sections) < 4) { $multiple = scalar(@sections); } |
$output .= '"multiple" size="'.$multiple.'">'."\n"; |
$output .= 'multiple size="'.$multiple.'">'."\n"; |
foreach my $sec (@sections) { |
foreach my $sec (@sections) { |
$output .= '<option value="'.$sec.'">'.$sec."</option>\n"; |
$output .= '<option value="'.$sec.'">'.$sec."</option>\n"; |
} |
} |
Line 1887 sub course_level_dc {
|
Line 1857 sub course_level_dc {
|
('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>'; |
('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>'; |
my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu'); |
my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu'); |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'typ' => "Type", |
|
'rol' => "Role", |
'rol' => "Role", |
'grs' => "Section", |
'grs' => "Section", |
'exs' => "Existing sections", |
'exs' => "Existing sections", |
Line 1900 sub course_level_dc {
|
Line 1869 sub course_level_dc {
|
my $header = '<h4>'.&mt('Course Level').'</h4>'. |
my $header = '<h4>'.&mt('Course Level').'</h4>'. |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&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(); |
&Apache::loncommon::end_data_table_header_row(); |
my $otheritems = &Apache::loncommon::start_data_table_row(). |
my $otheritems = &Apache::loncommon::start_data_table_row()."\n". |
'<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". |
|
'<td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',''".')" /></td>'."\n". |
'<td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',''".')" /></td>'."\n". |
'<td><select name="role">'."\n"; |
'<td><select name="role">'."\n"; |
foreach my $role ('st','ta','ep','in','cc') { |
foreach my $role ('st','ta','ep','in','cc') { |