version 1.41.2.8, 2010/11/08 21:44:55
|
version 1.41.2.10, 2010/12/02 02:21:35
|
Line 182 sub generate_page {
|
Line 182 sub generate_page {
|
enrollment => 'Access Dates', |
enrollment => 'Access Dates', |
personnel => 'Personnel', |
personnel => 'Personnel', |
review => 'Review', |
review => 'Review', |
process => 'Result', |
process => 'Request Outcome', |
pick_request => 'Display Summary', |
pick_request => 'Display Summary', |
details => 'Request Details', |
details => 'Request Details', |
cancel => 'Cancel Request', |
cancel => 'Cancel Request', |
Line 600 sub form_elements {
|
Line 600 sub form_elements {
|
cdescr => 'text', |
cdescr => 'text', |
concepttest => 'radio', |
concepttest => 'radio', |
); |
); |
|
$elements{'new'}{'enrollment'}{'timezone'} = 'selectbox'; |
if (&show_cloneable()) { |
if (&show_cloneable()) { |
$elements{'new'}{'courseinfo'}{'clonecrs'} = 'selectbox'; |
$elements{'new'}{'courseinfo'}{'clonecrs'} = 'selectbox'; |
$elements{'new'}{'courseinfo'}{'clonedom'} = 'hidden'; |
$elements{'new'}{'courseinfo'}{'clonedom'} = 'hidden'; |
Line 1751 sub print_enrollment_menu {
|
Line 1752 sub print_enrollment_menu {
|
&mt('No').'</label></span>'. |
&mt('No').'</label></span>'. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
&date_setting_table($starttime,$endtime,$formname,'enroll', |
&date_setting_table($starttime,$endtime,$formname,'enroll', |
$hasauto,%enrolltitles); |
$hasauto,$dom,%enrolltitles); |
} |
} |
} |
} |
my $access_dates = |
my $access_dates = |
&date_setting_table($starttime,$endtime,$formname,'access',$hasauto, |
&date_setting_table($starttime,$endtime,$formname,'access',$hasauto, |
%accesstitles); |
$dom,%accesstitles); |
if ($sections) { |
if ($sections) { |
$output .= $sections; |
$output .= $sections; |
} |
} |
Line 1773 sub print_enrollment_menu {
|
Line 1774 sub print_enrollment_menu {
|
} |
} |
$output .= &Apache::lonhtmlcommon::row_headline('Access'). |
$output .= &Apache::lonhtmlcommon::row_headline('Access'). |
'<h3>'.$header.'</h3>'. |
'<h3>'.$header.'</h3>'. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1); |
$access_dates; |
if ($dom eq 'gcitest') { |
|
my $includeempty = 1; |
|
my $timezone = &Apache::lonlocal::gettimezone(); |
|
$output .= &Apache::lonhtmlcommon::row_title('Time zone'). |
|
&Apache::loncommon::select_timezone('timezone',$timezone, |
|
undef,$includeempty). |
|
&Apache::lonhtmlcommon::row_closure(1); |
|
} |
|
$output .= $access_dates; |
} |
} |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
return $output; |
return $output; |
Line 1843 sub inst_section_selector {
|
Line 1852 sub inst_section_selector {
|
} |
} |
|
|
sub date_setting_table { |
sub date_setting_table { |
my ($starttime,$endtime,$formname,$prefix,$hasauto,%datetitles) = @_; |
my ($starttime,$endtime,$formname,$prefix,$hasauto,$dom,%datetitles) = @_; |
my ($perpetual,$table); |
my ($perpetual,$table); |
my $no_hh_mm_ss = 1; |
my $no_hh_mm_ss = 1; |
|
my $hide_timezone; |
if (&Apache::loncommon::needs_gci_custom()) { |
if (&Apache::loncommon::needs_gci_custom()) { |
$no_hh_mm_ss = ''; |
$no_hh_mm_ss = ''; |
|
if ($dom eq 'gcitest') { |
|
if ($prefix eq 'access') { |
|
$hide_timezone = 1; |
|
} |
|
} |
} |
} |
my $startform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'start', |
my $startform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'start', |
$starttime,'','','',$no_hh_mm_ss,'','','',1); |
$starttime,'','','',$no_hh_mm_ss,'','','',1,$hide_timezone); |
my $endform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'end', |
my $endform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'end', |
$endtime,'','','',$no_hh_mm_ss,'','','',1); |
$endtime,'','','',$no_hh_mm_ss,'','','',1,$hide_timezone); |
my $closure = ''; |
my $closure = ''; |
if ($prefix eq 'access') { |
if ($prefix eq 'access') { |
unless (&Apache::loncommon::needs_gci_custom()) { |
unless (&Apache::loncommon::needs_gci_custom()) { |
Line 2445 sub print_review {
|
Line 2460 sub print_review {
|
$inst_values .= '<td>'.&mt('None').'</td>'; |
$inst_values .= '<td>'.&mt('None').'</td>'; |
} |
} |
} |
} |
|
my $tz; |
|
if ($dom eq 'gcitest') { |
|
if (&Apache::lonlocal::gettimezone($env{'form.timezone'}) ne 'local') { |
|
$tz = $env{'form.timezone'}; |
|
} else { |
|
$tz = &Apache::lonlocal::gettimezone(); |
|
} |
|
$enroll_headers .= '<th>'.&mt('Time Zone').'</th>'; |
|
} |
$enroll_headers .= '<th>'.&mt('Access Starts').'</th>'. |
$enroll_headers .= '<th>'.&mt('Access Starts').'</th>'. |
'<th>'.&mt('Access Ends').'</th>'; |
'<th>'.&mt('Access Ends').'</th>'; |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend'); |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend',$tz); |
$enroll_values .= '<td>'.&Apache::lonlocal::locallocaltime($accessstart).'</td>'; |
if ($dom eq 'gcitest') { |
|
$enroll_values .= '<td>'.$tz.'</td>'; |
|
} |
|
$enroll_values .= '<td>'.&Apache::lonlocal::locallocaltime($accessstart,$tz).'</td>'; |
if ($accessend == 0) { |
if ($accessend == 0) { |
$enroll_values .= '<td>'.&mt('No end date').'</td>'; |
$enroll_values .= '<td>'.&mt('No end date').'</td>'; |
} else { |
} else { |
$enroll_values .= '<td>'.&Apache::lonlocal::locallocaltime($accessend).'</td>'; |
$enroll_values .= '<td>'.&Apache::lonlocal::locallocaltime($accessend,$tz).'</td>'; |
} |
} |
|
|
my $container = 'Course'; |
my $container = 'Course'; |
Line 2563 sub print_review {
|
Line 2590 sub print_review {
|
} |
} |
|
|
sub dates_from_form { |
sub dates_from_form { |
my ($startname,$endname) = @_; |
my ($startname,$endname,$timezone) = @_; |
my $startdate = &Apache::lonhtmlcommon::get_date_from_form($startname); |
my $startdate = &Apache::lonhtmlcommon::get_date_from_form($startname,$timezone); |
my $enddate = &Apache::lonhtmlcommon::get_date_from_form($endname); |
my $enddate = &Apache::lonhtmlcommon::get_date_from_form($endname,$timezone); |
if ($endname eq 'accessend') { |
if ($endname eq 'accessend') { |
if (exists($env{'form.no_end_date'}) ) { |
if (exists($env{'form.no_end_date'}) ) { |
$enddate = 0; |
$enddate = 0; |
Line 2630 ENDJS
|
Line 2657 ENDJS
|
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'</h3>'. |
'<h3>'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'</h3>'. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_title($desctitle). |
&Apache::lonhtmlcommon::row_title($desctitle). |
'<input type="text" size="60" name="cdescr" value="'.$description.'" />'; |
'<input type="text" size="60" name="cdescr" value="'.$description.'" />'; |
my $showclone; |
my $showclone; |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
$showclone = &show_cloneable(); |
$showclone = &show_cloneable(); |
Line 3072 sub print_request_outcome {
|
Line 3099 sub print_request_outcome {
|
push(@baduname,$uname.':'.$udom); |
push(@baduname,$uname.':'.$udom); |
} |
} |
} |
} |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend'); |
my ($accessstart,$accessend) = &dates_from_form('accessstart','accessend',$env{'form.timezone'}); |
my $autodrops = 0; |
my $autodrops = 0; |
if ($env{'form.autodrops'}) { |
if ($env{'form.autodrops'}) { |
$autodrops = $env{'form.autodrops'}; |
$autodrops = $env{'form.autodrops'}; |
Line 3136 sub print_request_outcome {
|
Line 3163 sub print_request_outcome {
|
personnel => \%personnel, |
personnel => \%personnel, |
}; |
}; |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
|
|
if ($env{'form.concepttest'} eq 'editmyown') { |
if ($env{'form.concepttest'} eq 'editmyown') { |
$details->{'firstres'} = 'nav'; |
$details->{'firstres'} = 'nav'; |
} else { |
} else { |
Line 3248 sub print_request_outcome {
|
Line 3276 sub print_request_outcome {
|
} |
} |
if ($dom eq 'gcitest') { |
if ($dom eq 'gcitest') { |
my $caller = 'requestcrs'; |
my $caller = 'requestcrs'; |
|
my $timezone; |
|
if (&Apache::lonlocal::gettimezone($env{'form.timezone'}) ne 'local') { |
|
$timezone = $env{'form.timezone'}; |
|
} else { |
|
$timezone = Apache::lonlocal::gettimezone(); |
|
} |
&acquire_cc_role($dom,$cnum,'cc./'.$dom.'/'.$cnum); |
&acquire_cc_role($dom,$cnum,'cc./'.$dom.'/'.$cnum); |
my %parmresult = |
my %parmresult = |
&store_crsparms($dom,$cnum,$now,$accessstart,$accessend); |
&store_crsparms($dom,$cnum,$now,$accessstart,$accessend); |
&Apache::londocsgci::setdefaults(); |
&Apache::londocsgci::setdefaults(); |
my %crsenvhash = ( |
my %crsenvhash = ( |
suppress_tries => 'yes', |
suppress_tries => 'yes', |
|
timezone => $timezone, |
); |
); |
my $putresult = &Apache::lonnet::put('environment',\%crsenvhash,$dom,$cnum); |
my $putresult = &Apache::lonnet::put('environment',\%crsenvhash,$dom,$cnum); |
if ($env{'form.concepttest'} eq 'cloning') { |
if ($env{'form.concepttest'} eq 'cloning') { |
Line 3273 sub print_request_outcome {
|
Line 3308 sub print_request_outcome {
|
} |
} |
$output .= '<ul>'. |
$output .= '<ul>'. |
'<li>'.&mt('Access starts:').' '. |
'<li>'.&mt('Access starts:').' '. |
&Apache::lonlocal::locallocaltime($accessstart).'</li>'. |
&Apache::lonlocal::locallocaltime($accessstart,$timezone).'</li>'. |
'<li>'.&mt('Access ends:').' '.&Apache::lonlocal::locallocaltime($accessend).'</li>'. |
'<li>'.&mt('Access ends:').' '.&Apache::lonlocal::locallocaltime($accessend,$timezone).'</li>'. |
'</ul><br />'; |
'</ul><br />'; |
$r->print($output); |
$r->print($output); |
$output = ''; |
$output = ''; |