[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm lonsimplepage.pm lonsyllabus.pm lontemplate.pm
bisitz
bisitz@source.lon-capa.org
Wed, 15 Apr 2009 10:49:30 -0000
This is a MIME encoded message
--bisitz1239792570
Content-Type: text/plain
bisitz Wed Apr 15 10:49:30 2009 EDT
Modified files:
/loncom/interface lonaboutme.pm lonsimplepage.pm lonsyllabus.pm
lontemplate.pm
Log:
No content changes - removed loads of annoying trailing blanks and tabs in script code
--bisitz1239792570
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090415104930.txt"
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.124 loncom/interface/lonaboutme.pm:1.125
--- loncom/interface/lonaboutme.pm:1.124 Tue Apr 14 15:32:12 2009
+++ loncom/interface/lonaboutme.pm Wed Apr 15 10:49:30 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Personal Information Page
#
-# $Id: lonaboutme.pm,v 1.124 2009/04/14 15:32:12 neumanie Exp $
+# $Id: lonaboutme.pm,v 1.125 2009/04/15 10:49:30 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -144,7 +144,7 @@
['forceedit','forcestudent',
'register','popup']);
-# ----------------------------------------------- Available Portfolio file display
+# ----------------------------------------------- Available Portfolio file display
if (($target ne 'tex') && ($action eq 'portfolio')) {
&display_portfolio_header($r,$is_course);
if ((!$is_course) && (!&Apache::lonnet::usertools_access($cnum,$cdom,'portfolio'))) {
@@ -154,7 +154,7 @@
'<li>'.&mt('The domain has been configured to disable, by default, portfolio functionality for all users in the domain.').'</li>'.
'</ul>');
} else {
- my ($blocked,$blocktext) =
+ my ($blocked,$blocktext) =
&Apache::loncommon::blocking_status('port',$cnum,$cdom);
if (!$blocked) {
&display_portfolio_files($r,$is_course);
@@ -199,13 +199,13 @@
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
my %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum);
my $allowed=0;
- my $privleged=$allowed=(($env{'user.name'} eq $cnum) &&
+ my $privleged=$allowed=(($env{'user.name'} eq $cnum) &&
($env{'user.domain'} eq $cdom));
- if ($forcestudent or $target eq 'tex') { $allowed=0; }
-
-
+ if ($forcestudent or $target eq 'tex') { $allowed=0; }
+
+
# --------------------------------------- There is such a user, get environment
-
+
if ($target ne 'tex') {
my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom);
my $args = {'function' => $forcestudent,
@@ -215,14 +215,14 @@
$args->{'no_nav_bar'} = 1;
}
$args->{'bread_crumbs'} = [{href=>"/adm/fhwfdev/$cnum/aboutme",text=>"Personal Information Page"}];
- my $start_page =
+ my $start_page =
&Apache::loncommon::start_page("Personal Data",$rss_link,$args);
$r->print($start_page);
-
- }
+
+ }
#Print Privacy Note
- if ($allowed) {
+ if ($allowed) {
$r->print('<div class="LC_info">'
.'<b>'.&mt('Privacy Note:').'</b> '
.&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.')
@@ -244,14 +244,14 @@
if ($target ne 'tex') {
if($allowed){
$r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
- }
+ }
}
#----------------Print Functions
if ($target ne 'tex'){
$r->print(&Apache::lontemplate::start_functionslist());
if($allowed){
- my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});
+ my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});
$r->print(&Apache::lontemplate::item_functionslist(
'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>'
.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')));
@@ -269,7 +269,7 @@
$r->print(&Apache::lontemplate::item_functionslist(
&Apache::loncommon::track_student_link('View recent activity by this student',$cnum,$cdom)));
}
- if (&Apache::lonnet::allowed('vgr', $env{'request.course.id'}) ||
+ if (&Apache::lonnet::allowed('vgr', $env{'request.course.id'}) ||
&Apache::lonnet::allowed('vgr', $env{'request.course.id'}.'/'.
$env{'request.course.sec'})) {
$r->print(&Apache::lontemplate::item_functionslist(
@@ -279,7 +279,7 @@
&Apache::loncommon::noteswrapper(&mt('Add Records'),$cnum,$cdom)));
}
$r->print(&Apache::lontemplate::end_functionslist());
- }
+ }
#------Print Headtitle
if ($target ne 'tex') {
$r->print('<div class="LC_ContentBoxSpecial">');
@@ -292,13 +292,13 @@
}
else {
$r->print('\noindent{\large\textbf{'.&Apache::loncommon::plainname($cnum,$cdom).'}}\\\\\\\\');
- $r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\');
+ $r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\');
}
# does this user have privileges to post, etc?
-
- my $query_string;
-
+
+ my $query_string;
+
if (($env{'form.uploaddoc.filename'}) &&
($env{'form.storeupl'}) && ($allowed)) {
if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
@@ -330,25 +330,25 @@
&Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum);
}
-my $image;
+my $image;
# ---------------------------------------------------------------- Get syllabus
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
if ($syllabus{'uploaded.photourl'}) {
&Apache::lonnet::allowuploaded('/adm/aboutme',
$syllabus{'uploaded.photourl'});
-
+
#This call is to resize all "Personal Information" images in the LonCapa System. When its done, you can remove this line.
&Apache::lonnet::resizeImage(&Apache::lonnet::filelocation('',$syllabus{'uploaded.photourl'}));
#---End Resize---
$image=qq{<img name="userPhoto" src="$syllabus{'uploaded.photourl'} " class="LC_AboutMe_Image" />};
-
+
if ($target eq 'tex') {
$image=&Apache::lonxml::xmlparse($r,'tex',$image);
}
-
+
}
-
+
if ($allowed) {
$r->print(
'<form method="post" enctype="multipart/form-data">'.
@@ -368,29 +368,29 @@
}
if($target ne 'tex') #print Image
- {
- &Apache::lontemplate::start_ContentBox($r);
+ {
+ &Apache::lontemplate::start_ContentBox($r);
&Apache::lontemplate::end_ContentBox($r);
- $r->print($image);
-
+ $r->print($image);
+
}#End Print Image
- #Print Content eg. Contactinfo aboutme,...
- &Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus);
+ #Print Content eg. Contactinfo aboutme,...
+ &Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus);
#End Print Content
if($target ne 'tex')#Begin Print RSS and portfiles
- {
+ {
&print_portfiles_link($r,$is_course);
if(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial');
- $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom));
- &Apache::lontemplate::print_end_template($r);
- }
-
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom));
+ &Apache::lontemplate::print_end_template($r);
+ }
+
} #End Print RSS and portfiles
-
+
if ($allowed) {
if ($env{'form.popup'}) {
$r->print('<input type="hidden" name="popup" value="'.
@@ -405,22 +405,22 @@
}
if($target ne 'tex'){
#$r->print('</blockquote>');
- #$r->print('</div>');
+ #$r->print('</div>');
}
if ($env{'request.course.id'}
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'})
&& &in_course($cdom,$cnum)) {
- if ($target ne 'tex') {
- $r->print('<a name="coursecomment" />');
+ if ($target ne 'tex') {
+ $r->print('<a name="coursecomment" />');
&Apache::lontemplate::print_start_template($r,&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course'),'LC_ContentBoxSpecial');
$r->print('<span class="LC_info">');
$r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message"));
- $r->print('</span> <p>');
+ $r->print('</span> <p>');
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
$r->print('</p>');
&Apache::lontemplate::print_end_template($r);
-
+
} else {
$r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
@@ -437,8 +437,8 @@
$r->print('\end{document}');
}
-
-
+
+
return OK;
}
@@ -490,11 +490,11 @@
'vpfi' => 'Viewable portfolio files',
'vgpf' => 'Viewable group portfolio files',
'difl' => 'Display file listing',
- );
+ );
if ($filecounts->{'both'} > 0) {
$output = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">';
$output .= ($is_course?$lt{'vgpf'}:$lt{'vpfi'}).'</h4><div class="LC_BoxPadding">';
-
+
#$output = '<h4>'.($is_course?$lt{'vgpf'}:$lt{'vpfi'}).'</h4>';
$output .= '<a href="/adm/'.$cdom.'/'.$cnum.'/aboutme/portfolio'.
$query_string.'">'.$lt{'difl'}.
@@ -529,11 +529,11 @@
sub build_query_string {
my ($new_items) = @_;
my $query_string;
- my @formelements = ('register');
+ my @formelements = ('register');
my $new = 0;
if (ref($new_items) eq 'HASH') {
$new = 1;
- if (!defined($new_items->{'forceedit'}) &&
+ if (!defined($new_items->{'forceedit'}) &&
!defined($new_items->{'forcestudent'})) {
push(@formelements,('forceedit','forcestudent'));
}
@@ -566,7 +566,7 @@
my $output;
if ($is_course) {
- $output =
+ $output =
&Apache::loncommon::start_page('Viewable group portfolio files',undef,
{'function' => $forcestudent,
'domain' => $cdom,});
@@ -647,7 +647,7 @@
};
my $current_permissions =
&Apache::lonnet::get_portfile_permissions($cdom,$cnum);
- my %access_controls =
+ my %access_controls =
&Apache::lonnet::get_access_controls($current_permissions);
my $portaccess;
if ($mode eq 'showlink') {
@@ -664,7 +664,7 @@
my %files_by_group;
foreach my $filename (sort(keys(%access_controls))) {
my ($group,$path) = split('/',$filename,2);
- $files_by_group{$group}{$path} = $access_controls{$filename};
+ $files_by_group{$group}{$path} = $access_controls{$filename};
}
foreach my $group (sort(keys(%files_by_group))) {
my %fileshash;
@@ -688,7 +688,7 @@
} else {
my $access_text;
if (ref($lt) eq 'HASH') {
- $access_text = $lt->{$portaccess};
+ $access_text = $lt->{$portaccess};
}
$r->print(&mt('There are no available files of the specified access type: [_1]',$access_text));
}
@@ -696,7 +696,7 @@
return $filecounts;
}
-{
+{
my $count=0;
sub portfolio_table_start {
$count=0;
@@ -785,7 +785,7 @@
$output .= &parse_directory($r,$depth,$currhash->{$item},
$path.'/'.$item,$is_course,$group);
} else {
- my $file_name;
+ my $file_name;
if ($currhash->{$item} =~ m|/([^/]+)$|) {
$file_name = $1;
} else {
@@ -796,7 +796,7 @@
if ($is_course) {
$url = '/uploaded/'.$cdom.'/'.$cnum.'/groups/'.$group.
'/portfolio/'.$currhash->{$item};
- } else {
+ } else {
$url = '/uploaded/'.$cdom.'/'.$cnum.'/portfolio/'.
$currhash->{$item};
}
@@ -841,7 +841,7 @@
$cdom = $coursehash{'domain'};
$cnum = $coursehash{'cnum'};
}
- if ((&Apache::lonnet::allowed('srm',$privcheck)) ||
+ if ((&Apache::lonnet::allowed('srm',$privcheck)) ||
(&Apache::lonnet::allowed('dff',$privcheck))) {
if (&in_course($uname,$udom,$cnum,$cdom)) {
return 1;
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.77 loncom/interface/lonsimplepage.pm:1.78
--- loncom/interface/lonsimplepage.pm:1.77 Fri Mar 27 15:46:38 2009
+++ loncom/interface/lonsimplepage.pm Wed Apr 15 10:49:30 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Page Editor
#
-# $Id: lonsimplepage.pm,v 1.77 2009/03/27 15:46:38 bisitz Exp $
+# $Id: lonsimplepage.pm,v 1.78 2009/04/15 10:49:30 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,7 +71,7 @@
# ------------------------------------------------------------ Print the screen
if ($target eq 'tex') {
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'}));
- }
+ }
# Is this even in a course?
unless ($env{'request.course.id'}) {
@@ -99,7 +99,7 @@
&Apache::loncommon::simple_error_page($r,'','Invalid group name');
return OK;
}
- %groupinfo =
+ %groupinfo =
&Apache::longroup::get_group_settings($curr_groups{$group});
$group_desc = &unescape($groupinfo{'description'});
}
@@ -133,9 +133,9 @@
if ($env{'form.ref'}) {
$refarg = '&ref='.$env{'form.ref'};
}
-
+
my %syllabus=&Apache::lonnet::dump($db_name,$dom,$crs);
-
+
# --------------------------------------- There is such a user, get environment
if ($target ne 'tex') {
@@ -143,7 +143,7 @@
if ($group ne '') {
$title = 'Simple Group Page';
}
- my $start_page =
+ my $start_page =
&Apache::loncommon::start_page($title,undef,
{'function' => $forcestudent,
'domain' => $dom,
@@ -163,12 +163,12 @@
$env{'request.course.id'}.'/'.$group);
$group_home_edit = &Apache::lonnet::allowed('mgh',
$env{'request.course.id'}.'/'.$group);
- if ($group_view_perm || $group_edit_perm || $group_home_view ||
+ if ($group_view_perm || $group_edit_perm || $group_home_view ||
$group_home_edit || &Apache::longroup::check_group_access($group)) {
if (($env{'form.ref'} eq 'grouplist') && ($target ne 'tex')) {
$r->print(&grouppage_breadcrumbs($dom,$crs,$group,$group_desc));
}
- if ((!$group_home_edit) && (!$group_home_view) &&
+ if ((!$group_home_edit) && (!$group_home_view) &&
(!$group_view_perm) && (!$group_edit_perm)) {
&display_group_links($r,$target,$group,'view',$refarg,%groupinfo);
if ($env{'form.grade_target'} ne 'tex') {
@@ -179,7 +179,7 @@
return OK;
}
} else {
- my $msg =
+ my $msg =
&mt('You do not currently have rights to view this group.');
if ($target ne 'tex') {
$r->print("<p>$msg</p>".
@@ -189,7 +189,7 @@
}
return OK;
}
- my ($blocked,$blocktext) =
+ my ($blocked,$blocktext) =
&Apache::loncommon::blocking_status('groups');
if ($blocked) {
$r->print($blocktext);
@@ -199,13 +199,13 @@
}
my $allowed;
-
+
if ($group ne '') {
$allowed = $group_edit_perm;
if (!$allowed) {
- $allowed = $group_home_edit;
+ $allowed = $group_home_edit;
}
- } else {
+ } else {
$allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
}
my $privileged=$allowed;
@@ -214,7 +214,7 @@
}
if ($forcestudent or $target eq 'tex') { $allowed=0; }
-
+
if (($env{'form.uploaddoc.filename'} and $target ne 'tex') &&
($env{'form.storeupl'}) && ($allowed)) {
if ($env{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
@@ -255,8 +255,8 @@
#---Print help Text
if($target ne 'tex'){
- if($allowed){
- $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
+ if($allowed){
+ $r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
}
}
#---Print Function
@@ -285,24 +285,24 @@
}
$r->print(&Apache::lontemplate::end_functionslist());
}
- }
+ }
# ---------------------------------------------------------------- Get syllabus
- if ((($syllabus{'uploaded.lastmodified'}) &&
- (($group ne '' && ($group_home_view || $group_edit_perm ||
+ if ((($syllabus{'uploaded.lastmodified'}) &&
+ (($group ne '' && ($group_home_view || $group_edit_perm ||
$group_view_perm)) || ($group eq ''))) || ($allowed)) {
my $image;
if ($syllabus{'uploaded.photourl'}) {
&Apache::lonnet::allowuploaded('/adm/smppg',
$syllabus{'uploaded.photourl'});
-
+
$image='<img src="'.$syllabus{'uploaded.photourl'}.'"
/>';
if ($target eq 'tex') {
$image=&Apache::lonxml::xmlparse($r,'tex',$image);
}
}
-
+
if ($allowed) {
$r->print(
'<form method="post" enctype="multipart/form-data">'.
@@ -313,13 +313,13 @@
'</form><form method="post">'.
'<input type="hidden" name="forceedit" value="edit" />'.
'<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" />' );
- }
+ }
if($allowed){
$r->print($image.'<div class="clear"> </div>');
}
-
+
foreach my $field (sort(keys(%syllabusfields))) {
- if (($syllabus{$field}) || ($allowed) ||
+ if (($syllabus{$field}) || ($allowed) ||
($field eq 'abb_links' && $group ne '')) {
my $message=$syllabus{$field};
&Apache::lonfeedback::newline_to_br(\$message);
@@ -348,21 +348,21 @@
$r->print(&Apache::lonxml::xmlparse($r,'tex','<h1>'.$message.'</h1>'));
}
if ($allowed) {
- if ($env{'form.grade_target'} ne 'tex') {
- &Apache::lontemplate::print_template($r, &mt('Title'), $message, $allowed, 'LC_ContentBoxSpecial');
- &Apache::lontemplate::print_editbox_template($r,$syllabus{$field},$field);
+ if ($env{'form.grade_target'} ne 'tex') {
+ &Apache::lontemplate::print_template($r, &mt('Title'), $message, $allowed, 'LC_ContentBoxSpecial');
+ &Apache::lontemplate::print_editbox_template($r,$syllabus{$field},$field);
$r->print('</p>');
} else {
my $safeinit;
$r->print(&Apache::lonxml::xmlparse($r,'tex',$syllabus{$field},$safeinit));
}
- }
- if(!$allowed) {$r->print($image); }
+ }
+ if(!$allowed) {$r->print($image); }
} else {
if ($target ne 'tex') {
if($allowed){
$r->print('<p>');
- }
+ }
&Apache::lontemplate::print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial');
} else {
my $safeinit;
@@ -463,7 +463,7 @@
my $output;
if ($context eq 'edit') {
$output = &mt('No group functionality.');
- } else {
+ } else {
$output = &mt('No group functionality (e.g., e-mail, discussion, chat room or file upload) is currently available to you in this group: [_1].','<b>'.&unescape($groupinfo{'description'}).'</b>');
}
if ($target eq 'tex') {
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.85 loncom/interface/lonsyllabus.pm:1.86
--- loncom/interface/lonsyllabus.pm:1.85 Tue Mar 31 08:49:09 2009
+++ loncom/interface/lonsyllabus.pm Wed Apr 15 10:49:30 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.85 2009/03/31 08:49:09 bisitz Exp $
+# $Id: lonsyllabus.pm,v 1.86 2009/04/15 10:49:30 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -69,20 +69,20 @@
if ($target eq 'tex') {
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'}));
- }
+ }
# -------------------------------------------------- Let's see who handles this
my $externalsyllabus=$courseenv{'externalsyllabus'};
if ($externalsyllabus=~/\w/) {
-
+
if ($env{'form.wrapperdisplay'} eq 'menu') {
$r->print(&Apache::lonwrapper::simple_menu());
- } else {
+ } else {
$r->print(&Apache::lonwrapper::wrapper("/public/$cdom/$cnum/syllabus?wrapperdisplay=menu",
$externalsyllabus));
}
return OK;
- }
+ }
# ------------------------------ The buck stops here: internal syllabus display
# --------------------------------------------------------- The syllabus fields
@@ -107,8 +107,8 @@
if ($env{'form.forcestudent'}) { $forcestudent='student'; };
my $forceedit='';
if ($env{'form.forceedit'}) { $forceedit='edit'; }
-
-# ----------------------------------------------------------------- Make header
+
+# ----------------------------------------------------------------- Make header
if ($target ne 'tex') {
my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom);
my $js;
@@ -139,7 +139,7 @@
ENDSCRIPT
}
- my $start_page =
+ my $start_page =
&Apache::loncommon::start_page("Syllabus", $rss_link.$js,
{'function' => $forcestudent,
'domain' => $cdom,
@@ -161,8 +161,8 @@
({href=>$r->uri,
text=>"Course syllabus"});
$r->print(&Apache::lonhtmlcommon::breadcrumbs());
- }
-
+ }
+
}
# ---------------------------------------------------------- Load syllabus info
my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);
@@ -182,7 +182,7 @@
$forcestudent='student';
}
if ($forcestudent or $target eq 'tex') { $allowed=0; }
- }
+ }
if (($allowed) && ($env{'form.storesyl'})) {
foreach my $syl_field (keys(%syllabusfields)) {
my $field=$env{'form.'.$syl_field};
@@ -248,15 +248,15 @@
#-Print Help Text
if ($target ne 'tex') {
- if($allowed){
+ if($allowed){
$r->print(&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
}
}
#--------Functions
if ($target ne 'tex') {
- if($allowed || $privileged){
+ if($allowed || $privileged){
$r->print(&Apache::lontemplate::start_functionslist());
- if($allowed){
+ if($allowed){
$r->print(&Apache::lontemplate::item_functionslist(
'<a href="'.$r->uri.'?forcestudent=1">'.&mt('Show Public View').'</a>'
.&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView')));
@@ -269,7 +269,7 @@
}
#----------------------------Print Headtitle
if($target ne 'tex'){
- $r->print('<h1>'.$courseenv{'description'}.'</h1>');
+ $r->print('<h1>'.$courseenv{'description'}.'</h1>');
$r->print('<h3>'. &Apache::lonnet::domain($cdom,'description').'</h3>');
}else{
$r->print('\noindent{\large\textbf{'.$courseenv{'description'}.'}}\\\\\\\\\textbf{'.
@@ -288,7 +288,7 @@
if ($target ne 'tex') {
$r->print(&Apache::lonhtmlcommon::row_title($element));
} else {
- $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & ');
+ $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$element).' & ');
}
foreach (split(/\,/,$coursepersonnel{$element})) {
my ($puname,$pudom)=split(/\:/,$_);
@@ -324,7 +324,7 @@
my $who = &Apache::loncommon::aboutmewrapper(
&Apache::loncommon::plainname($syllabus{'uploaded.name'},
$syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},
- $syllabus{'uploaded.domain'});
+ $syllabus{'uploaded.domain'});
if ($target ne 'tex') {
$r->print('<table><tr><td>'.&mt('Last updated').':</td><td>'.
$lastmod.'</td><td>'.
@@ -344,56 +344,56 @@
if ($target ne 'tex') {
if($allowed){
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial');
- $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
&Apache::lontemplate::print_end_template($r);
}
- elsif(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
+ elsif(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial');
- $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
+ $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
&Apache::lontemplate::print_end_template($r);
}
-
+
} else {
$r->print(&Apache::lonxml::xmlparse($r,'tex',$day));
- }
+ }
# ---------------------------------------------------------------- Get syllabus
- if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
+ if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
if ($allowed) {
$r->print('<form method="post">'.
'<input type="hidden" name="forceedit" value="edit" />');
}
my @htmlids=();
-
+
foreach my $field (sort(keys(%syllabusfields))) {
if (($syllabus{$field}=~/\w/) || ($allowed)) {
my $message=$syllabus{$field};
if ($field eq 'lll_includeurl') { # this is the "included" field
- my $urls=$message;
- $message='';
- foreach my $filelink (split(/\n/,$urls)) {
+ my $urls=$message;
+ $message='';
+ foreach my $filelink (split(/\n/,$urls)) {
my $output='';
# embed style?
- my ($curfext)=($filelink=~/\.([^\.]+)$/);
- my $embstyle=&Apache::loncommon::fileembstyle($curfext);
+ my ($curfext)=($filelink=~/\.([^\.]+)$/);
+ my $embstyle=&Apache::loncommon::fileembstyle($curfext);
if (($embstyle eq 'ssi') || ($curfext=~/\/$/)) {# make ssi call and remove everything but the body contents
$output=&Apache::lonnet::ssi_body($filelink);
} elsif ($embstyle eq 'img') {# embed as an image
$output='<img src="'.$filelink.'" />';
}
if($output ne ''){
- if ($target ne 'tex') {
+ if ($target ne 'tex') {
$message.='<p>'.$output.'</p>';
} else {
$message.=' '.&Apache::lonxml::xmlparse($r,'tex','<p>'.$output.'</p>').' ';
}
- }
+ }
}
if ($allowed) {
$r->print('<h3>'.$syllabusfields{$field}.
&Apache::loncommon::help_open_topic('Syllabus_URLs').'</h3>');
} else {
$r->print($message);
- }
+ }
} else {
&Apache::lonfeedback::newline_to_br(\$message);
$message =~s|(https?\://[^\s]+)|<a href="$1"><tt>$1</tt></a>|g;
@@ -404,7 +404,7 @@
if ($target ne 'tex') {
if($allowed){
$r->print('<p>');
- }
+ }
&Apache::lontemplate::print_template($r, $syllabusfields{$field}, $message,$allowed,'LC_ContentBoxSpecial');
} else {
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'.
@@ -417,22 +417,22 @@
$r->print('</p>');
&Apache::lontemplate::print_editbox_template($r, $syllabus{$field}, $field);
}
-
+
}
}
- }
-
+ }
+
if ($allowed) {
$r->print('</form>'.
&Apache::lonhtmlcommon::htmlareaselectactive(@htmlids));
}
# if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');}
} else {
- if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');}
+ if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');}
$r->print(&mt('No syllabus information provided.'));
if ($target ne 'tex') {$r->print('</p>');}
}
- if ($target ne 'tex') {
+ if ($target ne 'tex') {
if ($env{'form.backto'} eq 'coursecatalog') {
$r->print('<form name="backtocat" method="post" action="/adm/coursecatalog">'.
&Apache::lonhtmlcommon::echo_form_input(['backto','courseid']).
@@ -443,7 +443,7 @@
$r->print('\end{document}');
}
return OK;
-}
+}
1;
__END__
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.30 loncom/interface/lontemplate.pm:1.31
--- loncom/interface/lontemplate.pm:1.30 Tue Apr 14 15:32:12 2009
+++ loncom/interface/lontemplate.pm Wed Apr 15 10:49:30 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "Template" Functions to generate html output
#
-# $Id: lontemplate.pm,v 1.30 2009/04/14 15:32:12 neumanie Exp $
+# $Id: lontemplate.pm,v 1.31 2009/04/15 10:49:30 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -72,7 +72,7 @@
if ($target ne 'tex') {
if($allowed){
$r->print('<p>');
- }
+ }
if($field eq 'aaa_contactinfo') {
$r->print('<div class="LC_Clear_AboutMe_Image" > </div>');
@@ -81,7 +81,7 @@
else{
&print_template($r,$syllabusfields{$field},$message,$allowed,'LC_ContentBoxSpecial');
}
-
+
} else {
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'.
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\');
--bisitz1239792570--