');
} else {
- $r->print(&Apache::lonxml::xmlparse($r,'tex',
- &Apache::lonannounce::showday(time,2,
- &Apache::lonannounce::readcalendar($cdom.'_'.$cnum))));
+ $r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'.
+ &Apache::lonnet::domain($cdom,'description').'}\\\\');
}
# -------------------------------------------------------- Get course personnel
my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum);
if ($target ne 'tex') {
- $r->print('
');
+ $r->print(&Apache::lonhtmlcommon::start_pick_box());
} else {
- $r->print('\begin{tabular}{|p{0.45\textwidth}|p{0.45\textwidth}|}\hline');
+ $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('
'.$element.'
');
- } else {
- $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & ');
- }
+ my @personnel=sort(keys(%coursepersonnel));
+ my $lastpers=$personnel[$#personnel];
+ foreach my $element (@personnel) {
+ if ($target ne 'tex') {
+ $r->print(&Apache::lonhtmlcommon::row_title($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));
- } else {
- $r->print(' '.&Apache::loncommon::plainname($puname,
+ my ($puname,$pudom)=split(/\:/,$_);
+ if ($target ne 'tex') {
+ 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('
');
- } else {
- $r->print('\\\\ \hline');
- }
+ }
+ }
+ if ($target ne 'tex') {
+ my $lastclose=$element eq $lastpers?1:0;
+ $r->print(&Apache::lonhtmlcommon::row_closure($lastclose));
+ } else {
+ $r->print('\\\\ \hline');
+ }
}
if ($target ne 'tex') {
- $r->print('
');
+ $r->print(&Apache::lonhtmlcommon::end_pick_box());
} else {
- $r->print('\end{tabular}\\\\');
+ $r->print('\end{tabular}\\\\');
}
-# ---------------------------------------------------------- Load syllabus info
- my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
- my $allowed=0;
- my $privileged=0;
+# -------------------------------------------------------------- Announcements?
+ my $day = &Apache::lonannounce::showday(time,2,
+ &Apache::lonannounce::readcalendar($cdom.'_'.$cnum));
+ if ($target ne 'tex') {
+ if ($allowed) {
+ &Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box');
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
+ my $editurl= &Apache::lonnet::absolute_url().'/adm/'.$cdom.'/'.$cnum.'/_rss.html';
+ $r->print( ''.&mt('New RSS Feed or Blog').'');
+ &Apache::lontemplate::print_end_template($r);
+ } elsif (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') {
+ &Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box');
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
+ &Apache::lontemplate::print_end_template($r);
+ }
-# This handler might be called anonymously ...
-# ----------------------------------------------------- Only if not public call
- if ($env{'user.environment'}) {
-# does this user have privileges to post, etc?
- if ($env{'request.course.id'}) {
- $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
- $privileged=$allowed;
- if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) {
- $forcestudent='student';
- }
- if ($forcestudent or $target eq 'tex') { $allowed=0; }
- }
- 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')
- .' http://'.
- $Apache::lonnet::hostname{$homeserver}.$r->uri.''.
- &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'