--- modules/gci/londocsgci.pm 2009/12/21 15:51:29 1.6 +++ modules/gci/londocsgci.pm 2009/12/25 00:49:35 1.7 @@ -2,7 +2,7 @@ # Custom Edit Course Routines for Assembly of Valid Concept Tests from # Geoscience Concept Inventory. # -# $Id: londocsgci.pm,v 1.6 2009/12/21 15:51:29 gci Exp $ +# $Id: londocsgci.pm,v 1.7 2009/12/25 00:49:35 gci Exp $ # # Copyright Michigan State University Board of Trustees # @@ -153,13 +153,13 @@ sub checkvalid { sub fullurl { my ($item)=@_; - unless ($item=~/^\_/) { $item='_'.$item; } + unless ($item=~/\_/) { $item='_'.$item; } return $path.'/'.$version.'/GCI'.$item.'.problem'; } sub item_from_url { my ($url)=@_; - if ($url =~ m{\Q$path\E/\Q$version\E/GCI_([^.]+)\.problem$}) { + if ($url =~ m{\Q$path\E/\Q$version\E/GCI_?([^.]+)\.problem$}) { return $1; } } @@ -408,7 +408,7 @@ sub chosen_to_map { my $url = &LONCAPA::map::qtunescape(&fullurl($allprobs[$idx])); if (($revreqs{$allprobs[$idx]}) && ($chosenproblems{$revreqs{$allprobs[$idx]}})) { - my $probnum = $allprobs[$idx].'_'.$revreqs{$allprobs[$idx]}; + my $probnum = '_'.$allprobs[$idx].'_'.$revreqs{$allprobs[$idx]}; $url = &LONCAPA::map::qtunescape(&fullurl($probnum)); } elsif ($prereqs{$allprobs[$idx]}) { next;