--- modules/gci/londocsgci.pm 2009/09/24 22:18:52 1.1 +++ modules/gci/londocsgci.pm 2009/11/27 23:48:25 1.3 @@ -2,7 +2,7 @@ # Custom Edit Course Routines for Assembly of Valid Concept Tests from # Geoscience Concept Inventory. # -# $Id: londocsgci.pm,v 1.1 2009/09/24 22:18:52 gci Exp $ +# $Id: londocsgci.pm,v 1.3 2009/11/27 23:48:25 gci Exp $ # # Copyright Michigan State University Board of Trustees # @@ -50,6 +50,7 @@ my %probcat; my %prereqs; my @defchosen; my @chosen; +my %mandatory; sub setdefaults { $path='/res/gci/gci'; @@ -88,6 +89,7 @@ sub setdefaults { '61' => 'I' ,'62' => 'I' ,'63' => 'J' ,'64' => 'J' ,'65' => 'J' ,'66' => 'K' ,'67' => 'K' ,'68' => 'K' ,'69' => 'K' ,'70' => 'K' , '71' => 'K' , '2004_73' => 'M4'); + %mandatory=('01' => 1 ,'02' => 1,'37' => 1,'2004_73' => 1); %prereqs=('10' => '08', '57' => '52', '69' => '18'); @defchosen=('01','02','03','07','12','18','26','32','37','38','47','54','63','66','2004_73'); } @@ -106,7 +108,7 @@ sub checkvalid { } foreach my $cat (@categories) { unless ($covered{$cat}) { - push(@errors,&mt('Category [_1] not covered.',$cat)); + push(@errors,&mt('Bin [_1] not covered.',$cat)); } } foreach my $item (@chosen) { @@ -125,7 +127,7 @@ sub fullurl { return $path.'/'.$version.'/GCI'.$item.'.problem'; } -sub listresources { +sub validcheck { my ($r)=@_; my @errors=&checkvalid(); if ($#errors>-1) { @@ -134,22 +136,50 @@ sub listresources { $r->print('
'); } +} + +sub editor { + my ($r)=@_; my %chosen=(); foreach my $item (@chosen) { $chosen{$item}=1; } - $r->print('
'); + } } }