[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm lonsyllabus.pm
amueller
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 19 Nov 2008 11:51:49 -0000
amueller Wed Nov 19 11:51:49 2008 EDT
Modified files:
/loncom/interface lonaboutme.pm lonsyllabus.pm
Log:
edit lonsyllabus.pm with funtions from lontemplate.pm.
changed the way how to invoke functions from lontemplate.pm in the file lonaboutme.pm.
Included the new styles in the function print_template in file lontemplate.pm by Torben Ehlers and Alexander Schulze
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.72 loncom/interface/lonaboutme.pm:1.73
--- loncom/interface/lonaboutme.pm:1.72 Tue Nov 18 10:34:45 2008
+++ loncom/interface/lonaboutme.pm Wed Nov 19 11:51:49 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "About Me" Personal Information
#
-# $Id: lonaboutme.pm,v 1.72 2008/11/18 10:34:45 amueller Exp $
+# $Id: lonaboutme.pm,v 1.73 2008/11/19 11:51:49 amueller Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -202,7 +202,8 @@
&Apache::lonnet::allowuploaded('/adm/aboutme',
$syllabus{'uploaded.photourl'});
$image=
- qq{<img src="$syllabus{'uploaded.photourl'}" style="vertical-align:text-top;float:right;" />};
+ qq{<img name="userPhoto" src="$syllabus{'uploaded.photourl'}" style="vertical-align:text-top;float:right;" />};
+
if ($target eq 'tex') {
$image=&Apache::lonxml::xmlparse($r,'tex',$image);
}
@@ -244,7 +245,7 @@
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\');
}
if ($allowed) {
- Apache::lontemplate::print_editbox_template($r,$syllabusfields{$field},$field);
+ Apache::lontemplate::print_editbox_template($r,$syllabus{$field},$field);
}
}
}
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.69 loncom/interface/lonsyllabus.pm:1.70
--- loncom/interface/lonsyllabus.pm:1.69 Fri Nov 7 18:06:19 2008
+++ loncom/interface/lonsyllabus.pm Wed Nov 19 11:51:49 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.69 2008/11/07 18:06:19 bisitz Exp $
+# $Id: lonsyllabus.pm,v 1.70 2008/11/19 11:51:49 amueller Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,6 +29,7 @@
package Apache::lonsyllabus;
use strict;
+use Apache::lontemplate;
use Apache::Constants qw(:common);
use Apache::loncommon;
use Apache::lonnet;
@@ -353,8 +354,8 @@
}
if ($allowed) {
$r->print('<h3>'.$syllabusfields{$field}.
- &Apache::loncommon::help_open_topic('Syllabus_URLs').'</h3>'.
- '<p><a href="'.$r->uri.'?forcestudent=1"><font size="+1">'.&mt('Show Public View').'</font></a>'.
+ &Apache::loncommon::help_open_topic('Syllabus_URLs').'</h3>'.
+ '<p><a href="'.$r->uri.'?forcestudent=1"><font size="+1">'.&mt('Show Public View').'</font></a>'.
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>');
} else {
$r->print($message);
@@ -367,8 +368,9 @@
}
$message=&Apache::lontexconvert::msgtexconverted($message);
if ($target ne 'tex') {
- $r->print('<h3>'.$syllabusfields{$field}.'</h3><blockquote>'.
- $message.'</blockquote>');
+ &Apache::lontemplate::print_template($r, $syllabusfields{$field}, $message);
+# $r->print('<h3>'.$syllabusfields{$field}.'</h3><blockquote>'.
+# $message.'</blockquote>');
} else {
$r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'.
&Apache::lonxml::xmlparse($r,'tex',$message).'\\\\');
@@ -376,9 +378,10 @@
push(@htmlids,$field);
}
if ($allowed) {
- $r->print('<br /><textarea cols="80" rows="12" name="'.$field.'" id="'.$field.'">'.
- &HTML::Entities::encode($syllabus{$field},'"&<>').
- '</textarea> <input type="submit" name="storesyl" value="'.&mt('Save').'" />');
+ &Apache::lontemplate::print_editbox_template($r, $syllabus{$field}, $field);
+# $r->print('<br /><textarea cols="80" rows="12" name="'.$field.'" id="'.$field.'">'.
+ # &HTML::Entities::encode($syllabus{$field},'"&<>').
+ # '</textarea> <input type="submit" name="storesyl" value="'.&mt('Save').'" />');
}
}
}