--- loncom/interface/lonsyllabus.pm 2006/03/15 19:41:26 1.48
+++ loncom/interface/lonsyllabus.pm 2008/07/11 14:55:21 1.64
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.48 2006/03/15 19:41:26 albertel Exp $
+# $Id: lonsyllabus.pm,v 1.64 2008/07/11 14:55:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -38,6 +38,7 @@ use Apache::lonannounce;
use Apache::lonlocal;
use Apache::lonhtmlcommon;
use Apache::lonspeller();
+use HTML::Entities();
sub handler {
my $r = shift;
@@ -56,79 +57,30 @@ sub handler {
if ($homeserver eq 'no_host') {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- $r->print(&Apache::loncommon::startpage('No syllabus available').
- &mt('No syllabus available').
- &Apache::loncommon::end_page());
+ &Apache::loncommon::simple_error_page($r,'No syllabus available',
+ 'No syllabus available');
return OK;
}
# ------------------------------------- There is such a course, get environment
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
# ------------------------------------------------------------ Print the screen
- my $feedurl='http://'.$ENV{'HTTP_HOST'}.'/public/'.$cdom.'/'.$cnum.'/Course_Announcements.rss';
- if ($target ne 'tex') {
- my $html=&Apache::lonxml::xmlbegin();
- my $head=&Apache::loncommon::headtag('The LearningOnline Network with CAPA');
- $r->print(<
'.$element.' | '); + $r->print(&Apache::loncommon::start_data_table_row(). + ' | '.$element.' | '); } else { $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & '); } foreach (split(/\,/,$coursepersonnel{$element})) { my ($puname,$pudom)=split(/\:/,$_); if ($target ne 'tex') { - $r->print(' '.&Apache::loncommon::aboutmewrapper( - &Apache::loncommon::plainname($puname, - $pudom),$puname,$pudom)); + my $courseperson = &Apache::loncommon::plainname($puname,$pudom); + if (($env{'user.name'} eq '') || ($env{'user.name'} eq 'public') || + ($env{'user.domain'} eq '') || ($env{'user.domain'} eq 'public')) { + $r->print(' '.$courseperson); + } else { + $r->print(' '.&Apache::loncommon::aboutmewrapper($courseperson), + $puname,$pudom); + } } else { $r->print(' '.&Apache::loncommon::plainname($puname, $pudom).' '); } } if ($target ne 'tex') { - $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::lonnet::hostname($homeserver).$r->uri.''. &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'
'. ''.&mt('You can specify an external URL as Syllabus in the [_1].',''.&mt('Course Parameters').'').'
'. '');} 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') {