version 1.454, 2011/07/04 13:01:53
|
version 1.455, 2011/07/04 16:47:03
|
Line 918 sub replicate_content {
|
Line 918 sub replicate_content {
|
} elsif ($line =~ m{(|\Q</label>\E)\Q<br />Correct:<b><label>\E}) { |
} elsif ($line =~ m{(|\Q</label>\E)\Q<br />Correct:<b><label>\E}) { |
$foilcounter ++; |
$foilcounter ++; |
$mc_answer = $alphabet[$foilcounter]; |
$mc_answer = $alphabet[$foilcounter]; |
} elsif ($line !~ m{</label><br />}) { |
} elsif ($line !~ m{\Q</label>\E(|\Q</b>\E)\Q<br />\E}) { |
$line =~ s/^(\s+|\s+)$//g; |
$line =~ s/^(\s+|\s+)$//g; |
$line =~ s{^\Q<b>\E([^<]+)\Q</b>\E$}{1}; |
$line =~ s{^\Q<b>\E([^<]+)\Q</b>\E$}{1}; |
push(@tosave,$line); |
push(@tosave,$line); |
Line 929 sub replicate_content {
|
Line 929 sub replicate_content {
|
} |
} |
} |
} |
if (@tosave) { |
if (@tosave) { |
$content = $currdirpath."\t".$title."\t".join("\t",@tosave); |
my $qtype; |
if ($mc_answer) { |
if ($mc_answer) { |
$content .= "\t".$mc_answer."\n"; |
$qtype = 'MC'; |
} |
} |
|
$content = $currdirpath."\t".$title."\t$qtype\t".join("\t",@tosave); |
|
if ($mc_answer) { |
|
$content .= "\t".$mc_answer; |
|
} |
|
$content .= "\n"; |
} |
} |
} else { |
} else { |
$content = '<html><body>'.$content.'</body></html>'; |
$content = '<html><body>'.$content.'</body></html>'; |