Parent Directory
|
Revision Log
updated copyright header. -sam
1 ################################################################################ 2 # WeBWorK mod_perl (c) 2000-2002 WeBWorK Project 3 # $Id$ 4 ################################################################################ 5 6 package WeBWorK::Problem; 7 8 =head1 NAME 9 10 WeBWorK::Problem - store information about a problem. 11 12 =cut 13 14 use strict; 15 use warnings; 16 use Class::Struct; 17 18 struct map { $_ => '$' } our @FIELDS = qw( 19 id 20 set_id 21 login_id 22 source_file 23 value 24 max_attempts 25 problem_seed 26 status 27 attempted 28 last_answer 29 num_correct 30 num_incorrect 31 ); 32 33 sub toString($) { 34 my $self = shift; 35 my $result; 36 foreach (@FIELDS) { 37 $result .= "$_ => "; 38 $result .= defined $self->$_() ? $self->$_() : ""; 39 $result .= "\n"; 40 } 41 return $result; 42 } 43 44 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |