--- loncom/interface/lonpreferences.pm 2021/12/14 00:30:54 1.196.4.28
+++ loncom/interface/lonpreferences.pm 2025/03/07 02:13:40 1.248
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.196.4.28 2021/12/14 00:30:54 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.248 2025/03/07 02:13:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,7 +31,6 @@
package Apache::lonpreferences;
use strict;
-use LONCAPA;
use Apache::Constants qw(:common);
use Apache::File;
use Apache::loncommon();
@@ -40,6 +39,7 @@ use Apache::lonlocal;
use Apache::lonnet;
use LONCAPA::lonauthcgi();
use LONCAPA();
+use DateTime::TimeZone();
################################################################
# Handler subroutines #
@@ -103,16 +103,17 @@ sub languagechanger {
{ href => '/adm/preferences?action=changelanguages',
text => 'Change Language'});
$r->print(Apache::loncommon::start_page('Content Display Settings'));
- $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language').
+ '
');
my %userenv = &Apache::lonnet::get('environment',['languages']);
my $language=$userenv{'languages'};
$r->print(
''
+ ' '."\n".
+ '
'
);
}
@@ -165,7 +166,7 @@ sub texenginechanger {
my %mathchoices=('' => 'Default',
'tth' => 'tth (TeX to HTML)',
#'ttm' => 'TeX to MathML',
- 'MathJax' => 'MathJax',
+ 'MathJax' => 'MathJax',
'mimetex' => 'mimetex (Convert to Images)',
'raw' => 'Raw (Screen Reader)'
);
@@ -182,7 +183,7 @@ sub texenginechanger {
'change' => 'Save',
'exmpl' => 'Examples',
'mathjax' => 'MathJax:',
- 'mathjaxinfo' => 'MathJax provides rendered equations whose source code can be extracted in TeX and MathML formats by right clicking the equation.',
+ 'mathjaxinfo' => 'MathJax provides rendered equations whose source code can be extracted in TeX and MathML formats by right clicking the equation.',
'tth' => 'tth (TeX to HTML):',
'mimetex' => 'mimetex (Convert to Images):',
);
@@ -192,8 +193,8 @@ sub texenginechanger {
@@ -275,12 +276,13 @@ sub rolesprefchanger {
{ href => '/adm/preferences?action=changerolespref',
text => $brtext});
$r->print(Apache::loncommon::start_page('Content Display Settings'));
- $r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle).
+ '
');
my $hotlist_flag=$userenv{'recentroles'};
my $hotlist_n=$userenv{'recentrolesn'};
my ($checkedon,$checkedoff);
if ($hotlist_flag) {
- $checkedon = 'checked="checked"';
+ $checkedon = 'checked="checked"';
} else {
$checkedoff = 'checked="checked"';
}
@@ -294,49 +296,49 @@ sub rolesprefchanger {
}
# Get list of recent roles and display with checkbox in front
- my $roles_check_list = '';
- my $role_key='';
+ my $roles_check_list;
if ($env{'environment.recentroles'}) {
my %recent_roles =
&Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'});
my %frozen_roles =
&Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'});
-
+
my %role_text = &rolespref_get_role_text([keys(%recent_roles)]);
my @sorted_roles = sort {$role_text{$a} cmp $role_text{$b}} keys(%role_text);
- $roles_check_list .=
- &Apache::loncommon::start_data_table().
- &Apache::loncommon::start_data_table_header_row().
- "
');
unless ($checkedon) {
$r->print(&mt('LON-CAPA users with several '.$lc_role.'s may wish to enable the Hotlist.').' ');
}
@@ -344,7 +346,7 @@ sub rolesprefchanger {