Diff for /modules/gci/londocsgci.pm between versions 1.6 and 1.7

version 1.6, 2009/12/21 15:51:29 version 1.7, 2009/12/25 00:49:35
Line 153  sub checkvalid { Line 153  sub checkvalid {
   
 sub fullurl {  sub fullurl {
    my ($item)=@_;     my ($item)=@_;
    unless ($item=~/^\_/) { $item='_'.$item; }     unless ($item=~/\_/) { $item='_'.$item; }
    return $path.'/'.$version.'/GCI'.$item.'.problem';     return $path.'/'.$version.'/GCI'.$item.'.problem';
 }  }
   
 sub item_from_url {  sub item_from_url {
     my ($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;          return $1;
     }      }
 }  }
Line 408  sub chosen_to_map { Line 408  sub chosen_to_map {
           my $url  = &LONCAPA::map::qtunescape(&fullurl($allprobs[$idx]));            my $url  = &LONCAPA::map::qtunescape(&fullurl($allprobs[$idx]));
           if (($revreqs{$allprobs[$idx]}) &&             if (($revreqs{$allprobs[$idx]}) && 
               ($chosenproblems{$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));                $url = &LONCAPA::map::qtunescape(&fullurl($probnum));
           } elsif ($prereqs{$allprobs[$idx]}) {            } elsif ($prereqs{$allprobs[$idx]}) {
               next;                next;

Removed from v.1.6  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>