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

View of /trunk/webwork2/lib/WeBWorK/Set.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: 677 byte(s)
updated copyright header.
-sam

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9