--- loncom/interface/lonpreferences.pm 2006/06/14 18:56:58 1.88
+++ loncom/interface/lonpreferences.pm 2006/06/26 18:56:50 1.93
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.88 2006/06/14 18:56:58 albertel Exp $
+# $Id: lonpreferences.pm,v 1.93 2006/06/26 18:56:50 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -298,25 +298,92 @@ sub rolesprefchanger {
$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.
-
+# Get list of recent roles and display with checkbox in front
+ my $roles_check_list = '';
+ my $role_key='';
+ 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().
+ "