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

Diff of /trunk/webwork2/lib/WeBWorK/DB/Classlist.pm

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

Revision 358 Revision 359
5 5
6package WeBWorK::DB::Classlist; 6package WeBWorK::DB::Classlist;
7 7
8use strict; 8use strict;
9use warnings; 9use warnings;
10use WeBWorK::DB::User; 10use WeBWorK::User;
11 11
12# there should be a `use' line for each database type 12# there should be a `use' line for each database type
13use WeBWorK::DB::GDBM; 13use WeBWorK::DB::GDBM;
14 14
15# new($invocant, $courseEnv) 15# new($invocant, $courseEnv)
144# field names and the old ones will wither away. 144# field names and the old ones will wither away.
145 145
146sub hash2user($%) { 146sub hash2user($%) {
147 my $userID = shift; 147 my $userID = shift;
148 my %hash = @_; 148 my %hash = @_;
149 my $user = WeBWorK::DB::User->new(id => $userID); 149 my $user = WeBWorK::User->new(id => $userID);
150 $user->first_name ( $hash{stfn} ) if defined $hash{stfn}; 150 $user->first_name ( $hash{stfn} ) if defined $hash{stfn};
151 $user->last_name ( $hash{stln} ) if defined $hash{stln}; 151 $user->last_name ( $hash{stln} ) if defined $hash{stln};
152 $user->email_address ( $hash{stea} ) if defined $hash{stea}; 152 $user->email_address ( $hash{stea} ) if defined $hash{stea};
153 $user->student_id ( $hash{stid} ) if defined $hash{stid}; 153 $user->student_id ( $hash{stid} ) if defined $hash{stid};
154 $user->status ( $hash{stst} ) if defined $hash{stst}; 154 $user->status ( $hash{stst} ) if defined $hash{stst};

Legend:
Removed from v.358  
changed lines
  Added in v.359

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9