--- loncom/homework/lonhomework.pm 2006/05/15 19:29:17 1.247 +++ loncom/homework/lonhomework.pm 2006/06/08 22:33:57 1.249 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.247 2006/05/15 19:29:17 albertel Exp $ +# $Id: lonhomework.pm,v 1.249 2006/06/08 22:33:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -161,6 +161,8 @@ sub proctor_checked_in { my ($slot_name,$slot,$type)=@_; my @possible_proctors=split(",",$slot->{'proctor'}); + return 1 if (!@possible_proctors); + my $key; if ($type eq 'Task') { my $version=$Apache::lonhomework::history{'resource.0.version'}; @@ -168,9 +170,14 @@ sub proctor_checked_in { } elsif ($type eq 'problem') { $key ='resource.0.checkedin'; } - + # backward compatability, used to be username@domain, + # now is username:domain + my $who = $Apache::lonhomework::history{$key}; + if ($who !~ /:/) { + $who =~ tr/@/:/; + } foreach my $possible (@possible_proctors) { - if ($Apache::lonhomework::history{$key} eq $possible + if ($who eq $possible && $Apache::lonhomework::history{$key.'.slot'} eq $slot_name) { return 1; }