[LON-CAPA-cvs] cvs: modules /gci londocsgci.pm
gci
gci@source.lon-capa.org
Tue, 05 Jan 2010 23:54:31 -0000
gci Tue Jan 5 23:54:31 2010 EDT
Modified files:
/modules/gci londocsgci.pm
Log:
- Customization for GCI_3.
- Question count displayed allows for two-part problems (i.e., questions with prerequisites displayed as "composite" two-part problems).
Index: modules/gci/londocsgci.pm
diff -u modules/gci/londocsgci.pm:1.8 modules/gci/londocsgci.pm:1.9
--- modules/gci/londocsgci.pm:1.8 Tue Jan 5 12:36:11 2010
+++ modules/gci/londocsgci.pm Tue Jan 5 23:54:31 2010
@@ -2,7 +2,7 @@
# Custom Edit Course Routines for Assembly of Valid Concept Tests from
# Geoscience Concept Inventory.
#
-# $Id: londocsgci.pm,v 1.8 2010/01/05 12:36:11 gci Exp $
+# $Id: londocsgci.pm,v 1.9 2010/01/05 23:54:31 gci Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -182,6 +182,21 @@
sub listresources {
my ($r,$context,$cdom,$cnum)=@_;
my $numchosen = scalar(@chosen);
+ my $multipart = 0;
+ my $composites;
+ if ($numchosen > 0) {
+ foreach my $key (keys(%prereqs)) {
+ if (grep(/^\Q$key\E/,@chosen)) {
+ $multipart ++;
+ $numchosen --;
+ }
+ }
+ if ($multipart) {
+ $composites = &mt(' (of which [quant,_1,is a combination question,are combination questions] in which students select both an answer, and the reasoning used).',$multipart).'<br />';
+ } else {
+ $composites = '. ';
+ }
+ }
unless ($numchosen > 0) {
$r->print('<h3>'.&mt('Create a Concept Test').'</h3>'.
'<p>'.&mt('Choose how the test should be built:').'<br />'.
@@ -197,7 +212,7 @@
} else {
my $numsub = &get_submissions_count($cdom,$cnum);
unless ($env{'form.phase'} eq 'storemap') {
- $r->print('<p>'.&mt('This course contains a valid concept test which includes [quant,_1,question].',$numchosen).' <a href="/adm/navmaps" target="_coursecontents">'.&mt('Display Contents').'</a><br />');
+ $r->print('<p>'.&mt('This course contains a valid concept test which includes [quant,_1,question]',$numchosen).$composites.'<a href="/adm/navmaps" target="_coursecontents">'.&mt('Display Contents').'</a><br />');
}
if ($numsub > 0) {
$r->print(&mt('As there are existing student submissions, modification of the [_1]contents[_2] of the Concept Test will result in loss of student performance data, and is [_3]not[_4] permitted.','<i>','</i>','<b>','</b>').'<br />'.&mt('Modification of open and close dates [_1]is[_2] permitted.','<b>','</b>').'</p>');