--- loncom/interface/lonsyllabus.pm 2007/03/02 23:17:58 1.57 +++ loncom/interface/lonsyllabus.pm 2008/01/16 17:13:57 1.63 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.57 2007/03/02 23:17:58 albertel Exp $ +# $Id: lonsyllabus.pm,v 1.63 2008/01/16 17:13:57 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,9 +66,6 @@ sub handler { # ------------------------------------------------------------ Print the screen - my $rss_link = - &Apache::lonrss::rss_link('http://'.$ENV{'HTTP_HOST'}.'/public/'.$cdom.'/'.$cnum.'/Course_Announcements.rss'); - if ($target eq 'tex') { $r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'})); } @@ -112,6 +109,7 @@ sub handler { # ----------------------------------------------------------------- Make header if ($target ne 'tex') { + my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); my $start_page = &Apache::loncommon::start_page("Syllabus", $rss_link, {'function' => $forcestudent, @@ -120,10 +118,10 @@ sub handler { $env{'form.register'},}); $r->print($start_page.'

'.$courseenv{'description'}.'

'. - $Apache::lonnet::domaindescription{$cdom}.'

'); + &Apache::lonnet::domain($cdom,'description').''); } else { $r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'. - $Apache::lonnet::domaindescription{$cdom}.'}\\\\'); + &Apache::lonnet::domain($cdom,'description').'}\\\\'); } # -------------------------------------------------------------- Announcements? my $day = &Apache::lonannounce::showday(time,2, @@ -137,13 +135,14 @@ sub handler { # -------------------------------------------------------- Get course personnel my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum); if ($target ne 'tex') { - $r->print(''); + $r->print(&Apache::loncommon::start_data_table()); } else { $r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline'); } foreach my $element (sort keys %coursepersonnel) { if ($target ne 'tex') { - $r->print(''); + $r->print(''.&Apache::loncommon::end_data_table_row()); } else { $r->print('\\\\ \hline'); } } if ($target ne 'tex') { - $r->print('
'.$element.''); + $r->print(&Apache::loncommon::start_data_table_row(). + ''.$element.''); } else { $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & '); } @@ -159,13 +158,13 @@ sub handler { } } if ($target ne 'tex') { - $r->print('
'); + $r->print(&Apache::loncommon::end_data_table()); } else { $r->print('\end{tabular}\\\\'); } @@ -190,7 +189,7 @@ sub handler { } if ($allowed) { $r->print('

'. -&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'

'.&mt('This syllabus can be publicly viewed at') +&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).'

'.&mt('This syllabus can be publicly viewed at') .' http://'. &Apache::lonnet::hostname($homeserver).$r->uri.''. &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'

'. @@ -261,12 +260,16 @@ sub handler { $syllabus{'uploaded.domain'}); if ($target ne 'tex') { $r->print('
'.&mt('Last updated').':'. - $lastmod.''.&mt('by').' '.$who. + $lastmod.''. + ($who ? &mt('by').' '.$who + : '' ). '

'); } else { - $r->print('\\\\ '.&mt('Last updated').': '.$lastmod.' '.&mt('by').'\\\\ '. - &Apache::loncommon::plainname($syllabus{'uploaded.name'}, - $syllabus{'uploaded.domain'}).'\\\\'); + $r->print('\\\\ '.&mt('Last updated').': '.$lastmod.' '. + ($who? &mt('by').'\\\\ '. + &Apache::loncommon::plainname($syllabus{'uploaded.name'},$syllabus{'uploaded.domain'}) + :'') + .'\\\\'); } if ($allowed) { $r->print('

'. @@ -324,7 +327,7 @@ sub handler { if ($allowed) { $r->print('
'); + ' '); } } } @@ -335,7 +338,7 @@ sub handler { if ($target ne 'tex') {$r->print('

');} else {$r->print('\\\\');} } else { if ($target ne 'tex') {$r->print('

');} else {$r->print('\par ');} - $r->print('No syllabus information provided.'); + $r->print(&mt('No syllabus information provided.')); if ($target ne 'tex') {$r->print('

');} } if ($target ne 'tex') {