';
+ my $display_part=&get_display_part($partID,$symb);
+ $result.='
Part: '.$display_part.' '.
+ $resID.'
'.
+ '
Type: '.$responsetype.'
';
# '
Handgrade: '.$handgrade.'
';
+ }
}
$result.=''."\n";
return $result,$responseType,$hdgrade,$partlist,$handgrade;
@@ -1538,10 +1551,11 @@ sub handback_box {
my ($symb,$uname,$udom,$counter,$partid,$record) = @_;
my ($partlist,$handgrade,$responseType) = &response_type($symb);
my (@respids);
- foreach my $part_resp (sort(keys(%$handgrade))) {
- my ($part,$resp) = split(/_/,$part_resp);
+ my @part_response_id = &flatten_responseType($responseType);
+ foreach my $part_response_id (@part_response_id) {
+ my ($part,$resp) = @{ $part_response_id };
if ($part eq $partid) {
- push @respids,$resp;
+ push(@respids,$resp);
}
}
my $result;
@@ -1858,8 +1872,9 @@ KEYWORDS
$lastsubonly.='
'.$$string[0];
} else {
my %seenparts;
- for my $part (sort keys(%$handgrade)) {
- my ($partid,$respid) = split(/_/,$part);
+ my @part_response_id = &flatten_responseType($responseType);
+ foreach my $part (@part_response_id) {
+ my ($partid,$respid) = @{ $part };
my $display_part=&get_display_part($partid,$symb);
if ($env{"form.$uname:$udom:$partid:submitted_by"}) {
if (exists($seenparts{$partid})) { next; }
@@ -1883,7 +1898,7 @@ KEYWORDS
}
foreach (@$string) {
my ($partid,$respid) = /^resource\.([^\.]*)\.([^\.]*)\.submission/;
- if ($part ne ($partid.'_'.$respid)) { next; }
+ if (join('_',@{$part}) ne ($partid.'_'.$respid)) { next; }
my ($ressub,$subval) = split(/:/,$_,2);
# Similarity check
my $similar='';
@@ -1993,8 +2008,10 @@ KEYWORDS
my %seen = ();
my @partlist;
my @gradePartRespid;
- for my $part_resp (sort(keys(%$handgrade))) {
- my ($partid,$respid) = split(/_/, $part_resp);
+ my @part_response_id = &flatten_responseType($responseType);
+ foreach my $part_response_id (@part_response_id) {
+ my ($partid,$respid) = @{ $part_response_id };
+ my $part_resp = join('_',@{ $part_response_id });
next if ($seen{$partid} > 0);
$seen{$partid}++;
next if ($$handgrade{$part_resp} =~ /:no$/ && $env{'form.lastSub'} =~ /^(hdgrade)$/);
@@ -2440,8 +2457,11 @@ sub handback_files {
my ($request,$symb,$stuname,$domain,$newflg,$new_part,$newrecord) = @_;
my $portfolio_root = &propath($domain,$stuname).'/userfiles/portfolio';
my ($partlist,$handgrade,$responseType) = &response_type($symb);
- foreach my $part_resp (sort(keys(%$handgrade))) {
- my ($part_id, $resp_id) = split(/_/,$part_resp);
+
+ my @part_response_id = &flatten_responseType($responseType);
+ foreach my $part_response_id (@part_response_id) {
+ my ($part_id,$resp_id) = @{ $part_response_id };
+ my $part_resp = join('_',@{ $part_response_id });
if (($env{'form.'.$newflg.'_'.$part_resp.'_returndoc1'}) && ($new_part == $part_id)) {
# if multiple files are uploaded names will be 'returndoc2','returndoc3'
my $file_counter = 1;
@@ -2874,16 +2894,18 @@ sub viewgrades {
'
';
#radio buttons/text box for assigning points for a section or class.
#handles different parts of a problem
- my ($partlist,$handgrade) = &response_type($symb);
+ my ($partlist,$handgrade,$responseType) = &response_type($symb);
my %weight = ();
my $ctsparts = 0;
$result.='
';
my %seen = ();
- for (sort keys(%$handgrade)) {
- my ($partid,$respid) = split (/_/,$_,2);
+ my @part_response_id = &flatten_responseType($responseType);
+ foreach my $part_response_id (@part_response_id) {
+ my ($partid,$respid) = @{ $part_response_id };
+ my $part_resp = join('_',@{ $part_response_id });
next if $seen{$partid};
$seen{$partid}++;
- my $handgrade=$$handgrade{$_};
+ my $handgrade=$$handgrade{$part_resp};
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb);
$weight{$partid} = $wgt eq '' ? '1' : $wgt;