version 1.454, 2011/07/04 13:01:53
|
version 1.456, 2011/07/21 03:31:12
|
Line 681 sub build_package {
|
Line 681 sub build_package {
|
$currdirpath = 'Top'; |
$currdirpath = 'Top'; |
my $pcslist = $curRes->map_hierarchy(); |
my $pcslist = $curRes->map_hierarchy(); |
if ($pcslist ne '') { |
if ($pcslist ne '') { |
foreach my $pc (split(/,/,$pcslist)) { |
foreach my $pc (split(/,/,$pcslist),$curRes->map_pc()) { |
|
next if ($pc <= 1); |
my $res = $navmap->getByMapPc($pc); |
my $res = $navmap->getByMapPc($pc); |
if (ref($res)) { |
if (ref($res)) { |
my $encloser = $res->title(); |
my $encloser = $res->title(); |
Line 896 sub replicate_content {
|
Line 897 sub replicate_content {
|
grade_courseid => $cdom.'_'.$cnum, |
grade_courseid => $cdom.'_'.$cnum, |
grade_domain => $env{'user.domain'}, |
grade_domain => $env{'user.domain'}, |
grade_username => $env{'user.name'}, |
grade_username => $env{'user.name'}, |
grade_imsexport => 1, |
grade_imsexport => 1, |
|
instructor_comments => 'hide', |
); |
); |
my $feedurl=&Apache::lonnet::clutter($url); |
my $feedurl=&Apache::lonnet::clutter($url); |
my ($userview,$response)=&Apache::lonnet::ssi_body($feedurl,%form); |
my ($userview,$response)=&Apache::lonnet::ssi_body($feedurl,%form); |
Line 917 sub replicate_content {
|
Line 919 sub replicate_content {
|
$foilcounter ++; |
$foilcounter ++; |
} 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-1]; |
} 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); |
$tosave[$foilcounter] .= $line.' '; |
} |
} |
$content = join("\t",@tosave); |
$content = join("\t",@tosave); |
if ($mc_answer) { |
if ($mc_answer) { |
Line 929 sub replicate_content {
|
Line 931 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>'; |