[system] / trunk / webwork2 / lib / WeBWorK / DB / User.pm Repository:
ViewVC logotype

View of /trunk/webwork2/lib/WeBWorK/DB/User.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 358 - (download) (as text) (annotate)
Mon Jun 10 22:40:34 2002 UTC (17 years, 6 months ago) by sh002i
File size: 646 byte(s)
Implemented classlist database access using the User class for data
storage. Implements "classlist_DBglue.pl" style locking.
-sam

p.s.: don't you with that usernames could be included in the cvs mail
log? too bad cvs only exposes the UNIX username to the logging script. i
should patch cvs... bah...

    1 ################################################################################
    2 # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester
    3 # $Id$
    4 ################################################################################
    5 
    6 package WeBWorK::DB::User;
    7 
    8 use strict;
    9 use warnings;
   10 use Class::Struct;
   11 
   12 struct map { $_ => '$' } our @FIELDS = qw(
   13   id
   14   first_name
   15   last_name
   16   email_address
   17   student_id
   18   status
   19   section
   20   recitation
   21   comment
   22 );
   23 
   24 sub toString($) {
   25   my $self = shift;
   26   my $result;
   27   foreach (@FIELDS) {
   28     $result .= "$_ => ";
   29     $result .= defined $self->$_() ? $self->$_() : "";
   30     $result .= "\n";
   31   }
   32   return $result;
   33 }
   34 
   35 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9