--- loncom/interface/lonrequestcourse.pm 2009/09/09 15:49:26 1.33 +++ loncom/interface/lonrequestcourse.pm 2009/09/10 03:00:31 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.33 2009/09/09 15:49:26 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.34 2009/09/10 03:00:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -724,7 +724,9 @@ END END - $r->print(&header('Course Requests',$js.$jscript,$loaditems).$crumb.'
'. + $r->print(&header('Course Requests',$js.$jscript,$loaditems).$crumb. + '

'.&mt('Request creation of a new course, or manage pending course requests.').'

'. + '
'. &Apache::lonhtmlcommon::start_pick_box(). &Apache::lonhtmlcommon::row_title(&mt('Course Domain')). '
'. @@ -1134,7 +1136,7 @@ sub print_request_form { next => 'Next', ); $crstype = $env{'form.crstype'}; - $r->print(''); + $r->print('
'); my (@codetitles,%cat_titles,%cat_order,@code_order,$instcode,$code_chk, @disallowed); if ($crstype eq 'official') { @@ -1171,7 +1173,9 @@ sub print_request_form { $codepicker = &coursecode_form($dom,'instcode',\@codetitles, \%cat_titles,\%cat_order); if ($codepicker) { - $r->print('
'.&Apache::lonhtmlcommon::start_pick_box().$codepicker. + $r->print(&mt('Specify the course to be created.'). + '
'.&Apache::lonhtmlcommon::start_pick_box(). + $codepicker. &Apache::lonhtmlcommon::end_pick_box().'
'); } else { $next = $states->{$action}[$page+2]; @@ -1411,7 +1415,7 @@ sub get_excluded_elements { sub print_enrollment_menu { my ($formname,$instcode,$dom,$codetitles,$cat_titles,$cat_order,$code_order, $invalidcrosslist) =@_; - my ($sections,$autoenroll,$access_dates,$output); + my ($sections,$autoenroll,$access_dates,$output,$hasauto); my $starttime = time; my $endtime = time+(6*30*24*60*60); # 6 months from now, approx @@ -1430,7 +1434,8 @@ sub print_enrollment_menu { $section_form = &inst_section_selector($dom,$instcode); if ($section_form) { $sections = &Apache::lonhtmlcommon::row_headline(). - '

'.&mt('Sections for auto-enrollment').'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Sections'). + ' '.&mt('Sections for auto-enrollment').'

'. &Apache::lonhtmlcommon::row_closure(1). $section_form; } @@ -1457,26 +1462,29 @@ sub print_enrollment_menu { &Apache::lonhtmlcommon::row_closure(1). $crosslist_form; } + $hasauto = 1; $autoenroll = - &Apache::lonhtmlcommon::row_title(&mt('Add registered students automatically')). + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic('Course_Request_Autoadd').' '.&mt('Add registered students automatically')). ''.(' 'x3).''. &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::row_title(&mt('Drop unregistered students automatically')). + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic('Course_Request_Autodrop').' '.&mt('Drop unregistered students automatically')). ''.(' 'x3).''. &Apache::lonhtmlcommon::row_closure(1). - &date_setting_table($starttime,$endtime,$formname,'enroll',%enrolltitles); + &date_setting_table($starttime,$endtime,$formname,'enroll', + $hasauto,%enrolltitles); } } my $access_dates = - &date_setting_table($starttime,$endtime,$formname,'access',%accesstitles); + &date_setting_table($starttime,$endtime,$formname,'access',$hasauto, + %accesstitles); $output .= &Apache::lonhtmlcommon::start_pick_box(); if ($sections) { $output .= $sections; @@ -1530,7 +1538,8 @@ sub inst_section_selector { ''.&mt('Include?').''. ''.&mt('Institutional Section').''. - ''.&mt('LON-CAPA section').''. + ''.&Apache::loncommon::help_open_topic('Course_Request_LCSection'). + ' '.&mt('LON-CAPA section').''. &Apache::loncommon::end_data_table_row(); for (my $i=0; $i<@sections; $i++) { my $colflag = $i%2; @@ -1559,7 +1568,7 @@ sub inst_section_selector { } sub date_setting_table { - my ($starttime,$endtime,$formname,$prefix,%datetitles) = @_; + my ($starttime,$endtime,$formname,$prefix,$hasauto,%datetitles) = @_; my ($perpetual,$table); my $startform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'start', $starttime,'','','',1,'','','',1); @@ -1572,11 +1581,27 @@ sub date_setting_table { &mt('No end date').''; $closure = '1'; } - $table = &Apache::lonhtmlcommon::row_title($datetitles{'start'}). - $startform. + + my %help_item = ( + access => { + start => 'Course_Request_Access_Start', + end => 'Course_Request_Access_End', + }, + enroll => { + start => 'Course_Request_Enroll_Start', + end => 'Course_Request_Enroll_End', + }, + ); + if ($hasauto) { + $help_item{'access'}{'start'} = 'Course_Request_RegAccess_Start'; + $help_item{'access'}{'end'} = 'Course_Request_RegAccess_End'; + } + + $table = &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic($help_item{$prefix}{'start'}). + ' '.$datetitles{'start'}).$startform. &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::row_title($datetitles{'end'}). - $endform.$perpetual. + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic($help_item{$prefix}{'end'}). + ' '.$datetitles{'end'}).$endform.$perpetual. &Apache::lonhtmlcommon::row_closure($closure); return $table; } @@ -1645,7 +1670,7 @@ sub print_personnel_menu { ); $lt{'unofficial'} = $lt{'official'}; $output .= &Apache::lonhtmlcommon::row_headline(). - '

'.$lt{$crstype}.' '.&mt('Include other personnel?').'

'; + '

'.&Apache::loncommon::help_open_topic('Course_Request_Personnel').' '.$lt{$crstype}.' '.&mt('Include other personnel?').'

'; } for (my $i=0; $i<$persontotal; $i++) { my @linkargs = map { 'person_'.$i.'_'.$_ } (@items); @@ -1687,8 +1712,9 @@ sub print_personnel_menu { ''.&mt('First Name').'
'.$form_elems{'firstname'}.''."\n". ''.&mt('Last Name').'
'.$form_elems{'lastname'}.''."\n". ''.&mt('E-mail').'
'.$form_elems{'emailaddr'}.''."\n". - ''.&mt('Role').&Apache::loncommon::help_open_topic('Course_Roles').'
'.$roleselector.''."\n". - ''.&mt('LON-CAPA Section(s)').'
'.$sectionselector.''."\n". + ''.&Apache::loncommon::help_open_topic('Course_Roles').' '.&mt('Role').'
'.$roleselector.''."\n". + ''. + &Apache::loncommon::help_open_topic('Course_Request_Rolesection').' '.&mt('LON-CAPA Section(s)').'
'.$sectionselector.''."\n". ''.&Apache::lonhtmlcommon::row_closure(); } $output .= &Apache::lonhtmlcommon::row_title(&mt('Add another?')). @@ -1696,7 +1722,8 @@ sub print_personnel_menu { ''.&mt('Add?').&Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::end_pick_box().'
'; + &Apache::lonhtmlcommon::end_pick_box().'
'. + '

'.&mt('You may also add users later, once the course has been created, by using the "Manage course users" link, accessible from the "Main Menu".').'

'; return $output; } @@ -2241,7 +2268,7 @@ ENDJS } my $output .= $js_validate."\n".'
'.&Apache::lonhtmlcommon::start_pick_box(). &Apache::lonhtmlcommon::row_headline(). - '

'.$title.'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'

'. &Apache::lonhtmlcommon::row_closure(1). &Apache::lonhtmlcommon::row_title(&mt('Description')). ''; @@ -2255,7 +2282,7 @@ ENDJS $output .= $home_server_pick. &Apache::lonhtmlcommon::row_closure(). &Apache::lonhtmlcommon::row_headline(). - '

'.&mt('Clone content and settings from an existing course?').'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Clone').' '.&mt('Clone content and settings from an existing course?').'

'. &Apache::lonhtmlcommon::row_closure(1). &clone_form($dom,$formname,$crstype). &Apache::lonhtmlcommon::end_pick_box().'
'."\n"; @@ -2307,6 +2334,10 @@ sub coursecode_form { instcode => 'Course Category', crosslist => 'Cross Listed Course', ); + my %helpitem = ( + instcode => 'Course_Request_Category', + crosslist => 'Course_Request_Crosslist', + ); if ((ref($codetitles) eq 'ARRAY') && (ref($cat_titles) eq 'HASH') && (ref($cat_order))) { my ($sel,$instsec,$lcsec); @@ -2322,7 +2353,7 @@ sub coursecode_form { my $lastitem = pop(@{$codetitles}); my $lastinput = ''; if (@{$codetitles} > 0) { - $output = &Apache::lonhtmlcommon::row_title($rowtitle{$context}). + $output = &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic($helpitem{$context}).' '.$rowtitle{$context}). ''; if ($context eq 'crosslist') { $output .= '
'.&mt('Include?').'
'.