version 1.37, 2006/04/05 17:33:51
|
version 1.38, 2006/04/05 19:45:53
|
Line 2366 sub parse_webctvista4_question {
|
Line 2366 sub parse_webctvista4_question {
|
if ("@state" eq "questestinterop item presentation flow response_lid render_choice") { |
if ("@state" eq "questestinterop item presentation flow response_lid render_choice") { |
$$settings{$id}{$list}{randomize} = $attr->{shuffle}; |
$$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") { |
if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label") { |
$answer_id = $attr->{ident}; |
$answer_id = $attr->{ident}; |
push(@{$$allanswers{$id}{$list}},$answer_id); |
push(@{$$allanswers{$id}{$list}},$answer_id); |
Line 2424 sub parse_webctvista4_question {
|
Line 2425 sub parse_webctvista4_question {
|
$grp = $attr->{ident}; |
$grp = $attr->{ident}; |
push(@{$$settings{$id}{grps}},$grp); |
push(@{$$settings{$id}{grps}},$grp); |
%{$$settings{$id}{$grp}} = (); |
%{$$settings{$id}{$grp}} = (); |
|
@{$$allanswers{$id}{$grp}} = (); |
@{$$settings{$id}{$grp}{correctanswer}} = (); |
@{$$settings{$id}{$grp}{correctanswer}} = (); |
$$settings{$id}{$grp}{rcardinality} = $attr->{rcardinality}; |
$$settings{$id}{$grp}{rcardinality} = $attr->{rcardinality}; |
} |
} |
Line 2431 sub parse_webctvista4_question {
|
Line 2433 sub parse_webctvista4_question {
|
$currtexttype = lc($attr->{texttype}); |
$currtexttype = lc($attr->{texttype}); |
$$settings{$id}{$grp}{texttype} = $currtexttype; |
$$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}; |
$answer_id = $attr->{ident}; |
push(@{$$allanswers{$id}{$grp}},$answer_id); |
push(@{$$allanswers{$id}{$grp}},$answer_id); |
%{$$settings{$id}{$grp}{$answer_id}} = (); |
%{$$settings{$id}{$grp}{$answer_id}} = (); |
Line 2545 sub parse_webctvista4_question {
|
Line 2547 sub parse_webctvista4_question {
|
$$settings{$id}{$str_id}{$label}{$textlabel} = $text; |
$$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") { |
if ("@state" eq "questestinterop item presentation flow response_lid render_choice flow_label response_label material mattext") { |
$$settings{$id}{$list}{$answer_id}{text} .= $text; |
$$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") { |
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; |
$$settings{$id}{$list}{$answer_id}{text} = $text; |
} |
} |
Line 2571 sub parse_webctvista4_question {
|
Line 2575 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") { |
if ("@state" eq "questestinterop item resprocessing itemproc_extension unit_eval conditionvar varequal") { |
$$settings{$id}{$numid}{$unitid}{text} = $text; |
$$settings{$id}{$numid}{$unitid}{text} = $text; |
} |
} |
Line 3900 $$settings{$id}{$list}{jumbledtext}[$k]
|
Line 3915 $$settings{$id}{$list}{jumbledtext}[$k]
|
if ($$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{texttype} eq 'text/html') { |
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} = &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} = &Apache::loncleanup::htmlclean($$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text}); |
|
|
$$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} =~ s#(<img src=")([^>]+)>#$1../../resfiles/$2 />#gi; |
$$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} =~ s#(<img src=")([^>]+)>#$1../../resfiles/$2 />#gi; |
$$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} =~ s#</?p>##g; |
$$settings{$id}{$list}{$$allanswers{$id}{$list}[$k]}{text} =~ s#</?p>##g; |
} |
} |