'.
- '';
-
- $result.='Fullname: '.$fullname.
- ' | Username: '.$uname.
- ' | Domain: '.$udom.' | ';
- if ($ENV{'form.handgrade'} eq 'yes') {
-# my $subonly = &get_last_submission($symb,$uname,$udom,$ENV{'request.course.id'});
-# my ($classlist) = &getclasslist('all','0');
- my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist('all','0');
- my @collaborators;
-# foreach ( sort(@{ $$classlist{'all'} }) ) {
-# my ($uname,$udom) = split(/:/);
-# push @collaborators,$uname if (grep /\b$uname(\b|\.)/i,$subonly);
-# }
-# push @collaborators,'leede','carlandmm','freyniks'; # as a test to display collaborators.
- if (scalar(@collaborators) != 0) {
- $result.='Collaborators: ';
- foreach (@collaborators) {
- $result.=$_.' ('.$$fullname{$_.':'.$udom}.') ';
-# $result.=$_.' ('.&get_fullname($_,$udom).') ';
- }
- $result.=' | '."\n";
- $result.=''."\n";
- }
- }
- $request->print($result.' '."\n");
-
- my ($partlist,$handgrade) = &response_type($url);
-
- # print student answer
- if ($ENV{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) {
- my ($string,$timestamp)=&get_last_submission ($symb,$uname,$udom,$ENV{'request.course.id'});
- my $lastsubonly.=' | Last Submission Only'.
- ($$timestamp eq '' ? '' : ' Date Submitted: '.$$timestamp).' | ';
- if ($$timestamp eq '') {
- $lastsubonly.=''.$$string[0].' | ';
- } else {
- for my $part (sort keys(%$handgrade)) {
- foreach (@$string) {
- my ($partid,$respid) = /^resource\.(\d{1,2})\.(\d{1,2})\.submission/;
- if ($part eq ($partid.'_'.$respid)) {
- my ($ressub,$subval) = split(/:/,$_,2);
- $lastsubonly.='Part ID '.
- $partid.' Response ID '.$respid.
- ' Submission '.&keywords_highlight($subval).' | '
- if ($ENV{'form.lastSub'} eq 'lastonly' ||
- ($ENV{'form.lastSub'} eq 'hdgrade' && $$handgrade{$part} =~ /:yes$/));
- }
- }
- }
- }
- $lastsubonly.=''."\n";
- $request->print($lastsubonly);
- } else {
- $request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom,
- $ENV{'request.course.id'},$last,
- '.submission','Apache::grades::keywords_highlight'));
- }
-
- $result=''."\n".
- ''."\n".
- ''."\n";
- $result.=' Compose Message '."\n" if ($ENV{'form.handgrade'} eq 'yes');
- $request->print($result);
-
- my %seen = ();
- my @partlist;
- my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname);
-# while (my ($k,$v) = each (%record)){
-# print "key=$k ==> value=$v ";
-# }
- for (sort keys(%$handgrade)) {
- my ($partid,$respid) = split(/_/);
- next if ($seen{$partid} > 0);
- $seen{$partid}++;
- next if ($$handgrade{$_} =~ /:no$/);
- push @partlist,$partid;
- my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb,$udom,$uname);
- my $wgtmsg = ($wgt > 0 ? '(problem weight)' : 'problem weight assigned by computer');
- $wgt = ($wgt > 0 ? $wgt : '1');
- my $score = ($record{'resource.'.$partid.'.awarded'} eq '' ? '' : $record{'resource.'.$partid.'.awarded'}*$wgt);
-
- # display grading options
- $result='';
- $result.='';
- $request->print($result);
- }
- $request->print(''."\n");
- $request->print(' |
|