--- loncom/imspackages/imsprocessor.pm 2006/04/05 17:33:51 1.37 +++ loncom/imspackages/imsprocessor.pm 2006/04/05 19:45:53 1.38 @@ -2366,6 +2366,7 @@ sub parse_webctvista4_question { if ("@state" eq "questestinterop item presentation flow response_lid render_choice") { $$settings{$id}{$list}{randomize} = $attr->{shuffle}; } +# Multiple Choice, True/False and Combination if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label") { $answer_id = $attr->{ident}; push(@{$$allanswers{$id}{$list}},$answer_id); @@ -2424,6 +2425,7 @@ sub parse_webctvista4_question { $grp = $attr->{ident}; push(@{$$settings{$id}{grps}},$grp); %{$$settings{$id}{$grp}} = (); + @{$$allanswers{$id}{$grp}} = (); @{$$settings{$id}{$grp}{correctanswer}} = (); $$settings{$id}{$grp}{rcardinality} = $attr->{rcardinality}; } @@ -2431,7 +2433,7 @@ sub parse_webctvista4_question { $currtexttype = lc($attr->{texttype}); $$settings{$id}{$grp}{texttype} = $currtexttype; } - if ("@state" eq "questestinterop item presentation flow flow response_grp render_choice response_label") { + if ("@state" eq "questestinterop item presentation flow flow response_grp render_choice flow_label response_label") { $answer_id = $attr->{ident}; push(@{$$allanswers{$id}{$grp}},$answer_id); %{$$settings{$id}{$grp}{$answer_id}} = (); @@ -2545,9 +2547,11 @@ sub parse_webctvista4_question { $$settings{$id}{$str_id}{$label}{$textlabel} = $text; } } +# Matching if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label material mattext") { $$settings{$id}{$list}{$answer_id}{text} .= $text; } +# Multiple choice, True/False, Combination 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; } @@ -2571,6 +2575,17 @@ sub parse_webctvista4_question { } } } +# Matching + if ("@state" eq "questestinterop item presentation flow flow response_grp material mattext") { + $$settings{$id}{$grp}{text} = $text; + unless ($text eq '') { + push(@{$$allchoices{$id}},$grp); + } + } + if ("@state" eq "questestinterop item presentation flow flow response_grp render_choice flow_label response_label material mattext") { + $$settings{$id}{$grp}{$answer_id}{text} = $text; + } +# Numerical if ("@state" eq "questestinterop item resprocessing itemproc_extension unit_eval conditionvar varequal") { $$settings{$id}{$numid}{$unitid}{text} = $text; } @@ -3900,7 +3915,6 @@ $$settings{$id}{$list}{jumbledtext}[$k] if ($$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{texttype} eq 'text/html') { $$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} = &HTML::Entities::decode($$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text}); $$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} = &Apache::loncleanup::htmlclean($$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text}); - $$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} =~ s#(