[LON-CAPA-cvs] cvs: loncom /interface londocs.pm /xml londefdef.pm
raeburn
raeburn at source.lon-capa.org
Wed Jul 20 23:31:17 EDT 2011
raeburn Thu Jul 21 03:31:17 2011 EDT
Modified files:
/loncom/interface londocs.pm
/loncom/xml londefdef.pm
Log:
IMS Export.
- Exclude author-specified metadata and instructorcomment when rendering
problem in a course for export to testbank file ("text" format).
(MSU requirement for third party customized secure exam platform).
- Correct letter used to identify which foil in multople-choice is answer.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.455 loncom/interface/londocs.pm:1.456
--- loncom/interface/londocs.pm:1.455 Mon Jul 4 16:47:03 2011
+++ loncom/interface/londocs.pm Thu Jul 21 03:31:12 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.455 2011/07/04 16:47:03 raeburn Exp $
+# $Id: londocs.pm,v 1.456 2011/07/21 03:31:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -681,7 +681,8 @@
$currdirpath = 'Top';
my $pcslist = $curRes->map_hierarchy();
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);
if (ref($res)) {
my $encloser = $res->title();
@@ -896,7 +897,8 @@
grade_courseid => $cdom.'_'.$cnum,
grade_domain => $env{'user.domain'},
grade_username => $env{'user.name'},
- grade_imsexport => 1,
+ grade_imsexport => 1,
+ instructor_comments => 'hide',
);
my $feedurl=&Apache::lonnet::clutter($url);
my ($userview,$response)=&Apache::lonnet::ssi_body($feedurl,%form);
@@ -917,11 +919,11 @@
$foilcounter ++;
} elsif ($line =~ m{(|\Q</label>\E)\Q<br />Correct:<b><label>\E}) {
$foilcounter ++;
- $mc_answer = $alphabet[$foilcounter];
+ $mc_answer = $alphabet[$foilcounter-1];
} elsif ($line !~ m{\Q</label>\E(|\Q</b>\E)\Q<br />\E}) {
$line =~ s/^(\s+|\s+)$//g;
$line =~ s{^\Q<b>\E([^<]+)\Q</b>\E$}{1};
- push(@tosave,$line);
+ $tosave[$foilcounter] .= $line.' ';
}
$content = join("\t", at tosave);
if ($mc_answer) {
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.430 loncom/xml/londefdef.pm:1.431
--- loncom/xml/londefdef.pm:1.430 Wed Apr 13 10:08:06 2011
+++ loncom/xml/londefdef.pm Thu Jul 21 03:31:16 2011
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.430 2011/04/13 10:08:06 foxr Exp $
+# $Id: londefdef.pm,v 1.431 2011/07/21 03:31:16 raeburn Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -384,6 +384,9 @@
} else {
$currentstring = $token->[4];
}
+ if ($env{'form.grade_imsexport'}) {
+ $currentstring = '';
+ }
} elsif ($target eq 'meta') {
unless (&Apache::lonxml::get_param
('http-equiv',$parstack,$safeeval,undef,1)) {
More information about the LON-CAPA-cvs
mailing list