[system] / branches / rel-2-3-dev / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / UserList.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-3-dev/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4095 Revision 4096
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v 1.78 2006/01/25 23:13:53 sh002i Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v 1.79 2006/05/07 21:46:43 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
67use strict; 67use strict;
68use warnings; 68use warnings;
69use CGI qw(); 69use CGI qw();
70use WeBWorK::File::Classlist; 70use WeBWorK::File::Classlist;
71use WeBWorK::Utils qw(readFile readDirectory cryptPassword); 71use WeBWorK::Utils qw(readFile readDirectory cryptPassword);
72use WeBWorK::Authen qw(checkKey);
73use Apache::Constants qw(:common REDIRECT DONE); #FIXME -- this should be called higher up in the object tree. 72use Apache::Constants qw(:common REDIRECT DONE); #FIXME -- this should be called higher up in the object tree.
74use constant HIDE_USERS_THRESHHOLD => 200; 73use constant HIDE_USERS_THRESHHOLD => 200;
75use constant EDIT_FORMS => [qw(cancelEdit saveEdit)]; 74use constant EDIT_FORMS => [qw(cancelEdit saveEdit)];
76use constant PASSWORD_FORMS => [qw(cancelPassword savePassword)]; 75use constant PASSWORD_FORMS => [qw(cancelPassword savePassword)];
77use constant VIEW_FORMS => [qw(filter sort edit password import export add delete)]; 76use constant VIEW_FORMS => [qw(filter sort edit password import export add delete)];
1543 if ($editMode or $passwordMode) { 1542 if ($editMode or $passwordMode) {
1544 # column not there 1543 # column not there
1545 } else { 1544 } else {
1546 # check to see if a user is currently logged in 1545 # check to see if a user is currently logged in
1547 my $Key = $db->getKey($User->user_id); 1546 my $Key = $db->getKey($User->user_id);
1548 push @tableCells, ($Key and WeBWorK::Authen::check_session($self, $User->user_id, $Key->key, 1)) ? CGI::b("active") : CGI::em("inactive"); 1547 my $is_active = ($Key and time <= $Key->timestamp()+$ce->{sessionKeyTimeout}); # cribbed from check_session
1548 push @tableCells, $is_active ? CGI::b("active") : CGI::em("inactive");
1549 } 1549 }
1550 1550
1551 # change password (only in password mode) 1551 # change password (only in password mode)
1552 if ($passwordMode) { 1552 if ($passwordMode) {
1553 if ($User->user_id eq $user) { 1553 if ($User->user_id eq $user) {

Legend:
Removed from v.4095  
changed lines
  Added in v.4096

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9