version 1.106, 2003/06/20 14:56:09
|
version 1.107, 2003/06/20 16:13:06
|
Line 1433 sub crsenv {
|
Line 1433 sub crsenv {
|
} |
} |
} |
} |
# |
# |
|
# Deal with the enrollment dates |
|
if ($name =~ /^default_enrollment_(start|end)_date$/) { |
|
$value=&Apache::lonhtmlcommon::get_date_from_form($name.'_value'); |
|
} |
|
# |
# Let the user know we made the changes |
# Let the user know we made the changes |
if ($name) { |
if ($name) { |
my $put_result = &Apache::lonnet::put('environment', |
my $put_result = &Apache::lonnet::put('environment', |
Line 1510 sub crsenv {
|
Line 1515 sub crsenv {
|
'have different numbers and answers</font>', |
'have different numbers and answers</font>', |
'problem_stream_switch' |
'problem_stream_switch' |
=> '<b>Allow problems to be split over pages</b><br />'. |
=> '<b>Allow problems to be split over pages</b><br />'. |
' (<tt><b>yes</b> if allow anything else if not</tt>)' |
' (<tt><b>yes</b> if allow anything else if not</tt>)', |
); |
'default_enrollment_start_date' => 'The default beginning date '. |
foreach (keys(%values)) { |
'for enrolled students.', |
unless ($descriptions{$_}) { |
'default_enrollment_end_date' => 'The default ending date '. |
$descriptions{$_}=$_; |
'for enrolled students.', |
|
); |
|
my @Display_Order = ('url','description','courseid', |
|
'default_xml_style','pageseparators', |
|
'question.email','comment.email','policy.email', |
|
'pch.roles.denied','pch.users.denied', |
|
'allow_limited_html_in_feedback', |
|
'rndseed', |
|
'problem_stream_switch', |
|
'spreadsheet_default_classcalc', |
|
'spreadsheet_default_studentcalc', |
|
'spreadsheet_default_assesscalc', |
|
'hideemptyrows', |
|
'default_enrollment_start_date', |
|
'default_enrollment_end_date', |
|
); |
|
foreach my $parameter (sort(keys(%values))) { |
|
if (! $descriptions{$parameter}) { |
|
$descriptions{$parameter}=$parameter; |
|
push(@Display_Order,$parameter); |
} |
} |
} |
} |
foreach (sort keys %descriptions) { |
foreach my $parameter (@Display_Order) { |
|
my $description = $descriptions{$parameter}; |
# onchange is javascript to automatically check the 'Set' button. |
# onchange is javascript to automatically check the 'Set' button. |
my $onchange = 'onFocus="javascript:window.document.forms'. |
my $onchange = 'onFocus="javascript:window.document.forms'. |
'[\'envform\'].elements[\''.$_.'_setparmval\']'. |
"['envform'].elements['".$parameter."_setparmval']". |
'.checked=true;"'; |
'.checked=true;"'; |
$output.='<tr><td>'.$descriptions{$_}.'</td>'. |
$output .= '<tr><td>'.$description.'</td>'; |
'<td><input name="'.$_.'_value" size=40 '. |
if ($parameter =~ /^default_enrollment_(start|end)_date$/) { |
'value="'.$values{$_}.'" '.$onchange.' /></td>'. |
$output .= '<td>'. |
'<td><input type=checkbox name="'.$_.'_setparmval"></td>'. |
&Apache::lonhtmlcommon::date_setter('envform', |
'</tr>'."\n"; |
$parameter.'_value', |
|
$values{$parameter}, |
|
$onchange). |
|
'</td>'; |
|
} else { |
|
$output .= '<td>'. |
|
&Apache::lonhtmlcommon::textbox($parameter.'_value', |
|
$values{$parameter}, |
|
40,$onchange).'</td>'; |
|
} |
|
$output .= '<td>'. |
|
&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval'). |
|
'</td>'; |
|
$output .= "</tr>\n"; |
} |
} |
my $onchange = 'onFocus="javascript:window.document.forms'. |
my $onchange = 'onFocus="javascript:window.document.forms'. |
'[\'envform\'].elements[\'newp_setparmval\']'. |
'[\'envform\'].elements[\'newp_setparmval\']'. |