--- loncom/interface/lonpreferences.pm 2005/07/05 15:25:34 1.66
+++ loncom/interface/lonpreferences.pm 2005/12/28 21:39:35 1.72
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.66 2005/07/05 15:25:34 albertel Exp $
+# $Id: lonpreferences.pm,v 1.72 2005/12/28 21:39:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -188,7 +188,7 @@ sub texenginechanger {
my $texengine=$userenv{'texengine'};
my $pref=&mt('Preferred method to display Math');
- my %mathchoices=('' => 'No Preference',
+ my %mathchoices=('' => 'Default',
'tth' => 'TeX to HTML',
#'ttm' => 'TeX to MathML',
'jsMath' => 'jsMath',
@@ -196,25 +196,22 @@ sub texenginechanger {
);
my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine',
%mathchoices);
- my $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$';
- my $jsMath_example=&Apache::lontexconvert::jsMath_converted(\$mathexample);
- $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$';
- my $tth_example=&Apache::lontexconvert::tth_converted(\$mathexample);
- $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$';
- my $mimetex_example=&Apache::lontexconvert::mimetex_converted(\$mathexample);
+ my $jsMath_start=&Apache::lontexconvert::jsMath_header();
my $change=&mt('Change');
$r->print(<
+
Examples:
-
TeX to HTML $tth_example
-
-
+
TeX to HTML
+
+
jsMath
-
+$jsMath_start
+
-$jsMath_example
-
Convert to Images $mimetex_example
+
+
Convert to Images
+
+
+
ENDLSCREEN
if ($env{'environment.texengine'} ne 'jsMath') {
$r->print('');
@@ -402,7 +403,7 @@ sub verify_and_change_screenname {
&Apache::lonnet::delenv('environment\.nickname');
$message.='Reset nickname';
}
-
+ &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
$r->print(< 'First resource',
+ whatsnew => "What's new page",
+ );
+ my $whatsnew_off=&mt('Display the [_1] in the course.','first resource');
+ my $whatsnew_on=&mt('Display the "[_1]" page - a summary of items in the course which require attention.',"What's New");
- $r->print(' '.&mt('Set the page to be displayed when you select the role of Course Coordinator').':');
+ $r->print(' '.&mt('Set the default page to be displayed when you select a course role').' '.&mt('(Currently: [_1])',$pagenames{$currvalue}).' '.&mt('The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the "[_1]" page in the course',"What's New").'
');
$r->print(<
+
-
+
ENDLSCREEN
- $r->print('
+ $r->print('
');
}
@@ -1006,22 +1015,25 @@ sub verify_and_change_coursepage {
my $r = shift;
my $message='';
my %lt = &Apache::lonlocal::texthash(
- 'when' => 'Whenever you select the Course Coordinator role from the roles screen',
+ 'defs' => 'Default now set',
+ 'when' => 'when you select a course role from the roles screen',
'ywbt' => 'you will be taken to the start of the course.',
'apwb' => 'a page will be displayed that lists items in the course that may require action from you.',
'gtts' => 'Go to the start of the course',
- 'dasp' => 'Display a summary page listing course action items',
+ 'dasp' => "Display the What's New page listing course action items",
);
my $newdisp = $env{'form.newdisp'};
+ $message = ''.$lt{'defs'}.': '.$lt{'when'}.', ';
if ($newdisp eq 'firstres') {
- $message .= $lt{'when'}.', '.$lt{'ywbt'}.' ';
+ $message .= $lt{'ywbt'}.' ';
&Apache::lonnet::put('environment',{'course_init_display' => $newdisp});
&Apache::lonnet::appenv('environment.course_init_display' => $newdisp);
} else {
- $message .= $lt{'when'}.', '.$lt{'apwb'}.' ';
+ $message .= $lt{'apwb'}.' ';
&Apache::lonnet::del('environment',['course_init_display']);
&Apache::lonnet::delenv('environment\.course_init_display');
}
+ my $refpage = $env{'form.refpage'};
if (($env{'request.course.fn'}) && ($env{'request.course.id'})) {
if ($newdisp eq 'firstres') {
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
@@ -1030,7 +1042,8 @@ sub verify_and_change_coursepage {
&Apache::lonuserstate::readmap($cdom.'/'.$cnum);
$message .= ' '.$lt{'gtts'}.' '.&mt('now').'';
} else {
- $message .= ' '.$lt{'dasp'}.'';
+ $message .= ' '.$lt{'dasp'}.'';
}
}
$r->print(<header_only;
#
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['action','wysiwyg','returnurl']);
+ ['action','wysiwyg','returnurl','refpage']);
#
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb
@@ -1220,7 +1233,7 @@ sub handler {
text => 'Change Math Preferences'},
printmenu => 'yes',
}));
- if($env{'request.role'} =~ /^cc\.\//) {
+ if ($env{'user.adv'}) {
push (@Options,({ action => 'changecourseinit',
linktext => 'Change Course Initialization Preference',
href => '/adm/preferences',