[LON-CAPA-cvs] cvs: loncom /imspackages imsprocessor.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Tue, 04 Apr 2006 17:42:30 -0000
raeburn Tue Apr 4 13:42:30 2006 EDT
Modified files:
/loncom/imspackages imsprocessor.pm
Log:
Import of WebCT Vista 4 "Combination" question type supported (maps to LC problem with radioresponse).
Index: loncom/imspackages/imsprocessor.pm
diff -u loncom/imspackages/imsprocessor.pm:1.35 loncom/imspackages/imsprocessor.pm:1.36
--- loncom/imspackages/imsprocessor.pm:1.35 Tue Apr 4 04:16:41 2006
+++ loncom/imspackages/imsprocessor.pm Tue Apr 4 13:42:28 2006
@@ -2263,7 +2263,6 @@
my $jumble_item;
my $numbox = 0;
my %str_answers = ();
- my $currtextlabel;
my $textlabel;
my $currindex;
my %varinfo = ();
@@ -2372,9 +2371,6 @@
if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label material mattext") {
$currtexttype = lc($attr->{texttype});
$$settings{$id}{$list}{$answer_id}{texttype} = $currtexttype;
- if ($$settings{$id}{class} eq 'combination') {
- $currtextlabel = $attr->{label};
- }
}
# String, Shortanswer or Paragraph
@@ -2541,11 +2537,6 @@
}
if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label material mattext") {
$$settings{$id}{$list}{$answer_id}{text} .= $text;
- if ($$settings{$id}{class} eq 'combination') {
- if ($currtextlabel =~ /^wct_mc_answer_text\d+_\d+$/) {
- $$settings{$id}{$list}{$answer_id}{text} .= ', ';
- }
- }
}
if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label material mat_extension webct:localizable_mattext") {
$$settings{$id}{$list}{$answer_id}{text} = $text;
@@ -2561,10 +2552,10 @@
$$settings{$id}{text} .= $text;
if ($$settings{$id}{class} eq 'combination') {
if ($textlabel =~ /^wct_question_label_\d+$/) {
- $$settings{$id}{$text} .= '<br />';
+ $$settings{$id}{text} .= '<br />';
}
- if ($textlabel =~ /^wct_cmc_single_answer_\d+$/) {
- $$settings{$id}{$text} .= '<br />';
+ if ($textlabel =~ /^wct_cmc_single_answer\d+$/) {
+ $$settings{$id}{text} .= '<br />';
}
}
}
@@ -3764,7 +3755,8 @@
} else {
$resourcedata{$symb.'questiontext'} = '<p>'.$$settings{$id}{text}.'</p>'.$questionimage;
}
- if ($$settings{$id}{class} eq 'multiplechoice') {
+ if (($$settings{$id}{class} eq 'multiplechoice') ||
+ ($$settings{$id}{class} eq 'combination')) {
foreach my $list (@{$$settings{$id}{lists}}) {
my $numfoils = @{$$allanswers{$id}{$list}};
if ($$settings{$id}{$list}{rcardinality} eq 'Single') {