--- loncom/interface/lonpreferences.pm 2004/06/08 01:32:02 1.44
+++ loncom/interface/lonpreferences.pm 2004/11/19 20:17:52 1.50
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.44 2004/06/08 01:32:02 www Exp $
+# $Id: lonpreferences.pm,v 1.50 2004/11/19 20:17:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -177,6 +177,83 @@ $message
ENDVCSCREEN
}
+################################################################
+# Roles Page Preference Change Subroutines #
+################################################################
+sub rolesprefchanger {
+ my $r = shift;
+ my $user = $ENV{'user.name'};
+ my $domain = $ENV{'user.domain'};
+ my %userenv = &Apache::lonnet::get
+ ('environment',['recentroles','recentrolesn']);
+ my $hotlist_flag=$userenv{'recentroles'};
+ my $hotlist_n=$userenv{'recentrolesn'};
+ my $checked;
+ if ($hotlist_flag) {
+ $checked = 'checked="checked"';
+ }
+
+ if (!$hotlist_n) { $hotlist_n=3; }
+ my $options;
+ for (my $i=1; $i<10; $i++) {
+ my $select;
+ if ($hotlist_n == $i) { $select = 'selected="selected"'; }
+ $options .= "\n";
+ }
+
+ $r->print(<Some LON-CAPA users have a long list of roles. The Recent Roles Hotlist
+feature keeps track of the last N roles which have been
+visited and places a table of these at the top of the roles page.
+People with very few roles should leave this feature disabled.
+