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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 494 - (download) (as text) (annotate)
Wed Aug 21 18:31:20 2002 UTC (10 years, 9 months ago) by sh002i
File size: 688 byte(s)
updated copyright header.
-sam

    1 ################################################################################
    2 # WeBWorK mod_perl (c) 2000-2002 WeBWorK Project
    3 # $Id$
    4 ################################################################################
    5 
    6 package WeBWorK::User;
    7 
    8 =head1 NAME
    9 
   10 WeBWorK::User - store information about a user.
   11 
   12 =cut
   13 
   14 use strict;
   15 use warnings;
   16 use Class::Struct;
   17 
   18 struct map { $_ => '$' } our @FIELDS = qw(
   19   id
   20   first_name
   21   last_name
   22   email_address
   23   student_id
   24   status
   25   section
   26   recitation
   27   comment
   28 );
   29 
   30 sub toString($) {
   31   my $self = shift;
   32   my $result;
   33   foreach (@FIELDS) {
   34     $result .= "$_ => ";
   35     $result .= defined $self->$_() ? $self->$_() : "";
   36     $result .= "\n";
   37   }
   38   return $result;
   39 }
   40 
   41 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9