--- loncom/interface/lonpreferences.pm 2005/12/09 23:48:06 1.69
+++ loncom/interface/lonpreferences.pm 2005/12/20 15:52:27 1.71
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.69 2005/12/09 23:48:06 albertel Exp $
+# $Id: lonpreferences.pm,v 1.71 2005/12/20 15:52:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -982,24 +982,31 @@ sub coursedisplaychanger {
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get('environment',['course_init_display']);
-
+ my $currvalue = 'whatsnew';
my $firstselect='checked="checked"';
my $whatsnewselect='';
- if ($userenv{'course_init_display'} ne 'firstres') {
- $firstselect='';
- $whatsnewselect='checked="checked"';
+ if (exists($userenv{'course_init_display'})) {
+ if ($userenv{'course_init_display'} eq 'firstres') {
+ $currvalue = 'firstres';
+ $firstselect='';
+ $whatsnewselect='checked="checked"';
+ }
}
- my $whatsnew_off=&mt('Display the first resource in the course.');
- my $whatsnew_on=&mt('Display a summary of items in the course which require action from the course coordinator.');
+ my %pagenames = (
+ firstres => '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").'