[LON-CAPA-cvs] cvs: loncom /homework grades.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 07 Aug 2003 17:32:21 -0000


bowersj2		Thu Aug  7 13:32:21 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Update grades to call navmap->new without parameters; I note many places 
  in grades.pm never called navmap->init(), which is one of the reasons 
  I'm getting rid of that method; nobody except me is calling it correctly 
  and that's a bad sign.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.131 loncom/homework/grades.pm:1.132
--- loncom/homework/grades.pm:1.131	Thu Aug  7 10:33:15 2003
+++ loncom/homework/grades.pm	Thu Aug  7 13:32:21 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.131 2003/08/07 14:33:15 bowersj2 Exp $
+# $Id: grades.pm,v 1.132 2003/08/07 17:32:21 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2799,9 +2799,7 @@
 
 sub getSymbMap {
     my ($request) = @_;
-    my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
-						  $ENV{'request.course.fn'}.'_parms.db');
-    $navmap->init();
+    my $navmap = Apache::lonnavmaps::navmap->new();
 
     my %symbx = ();
     my @titles = ();
@@ -2846,8 +2844,7 @@
     &sub_page_js($request);
     $request->print($result);
 
-    my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
-						  $ENV{'request.course.fn'}.'_parms.db',1, 1);
+    my $navmap = Apache::lonnavmaps::navmap->new();
     my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
     my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
 
@@ -3009,8 +3006,7 @@
 
     $request->print($result);
 
-    my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
-						  $ENV{'request.course.fn'}.'_parms.db',1, 1);
+    my $navmap = Apache::lonnavmaps::navmap->new();
     my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
     my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
 
@@ -3329,7 +3325,7 @@
     my @scanlines=<$scanlines>;
     my $classlist=&Apache::loncoursedata::get_classlist();
     my %idmap=&username_to_idmap($classlist);
-    my $navmap=Apache::lonnavmaps::navmap->new(1, 1);
+    my $navmap=Apache::lonnavmaps::navmap->new();
     my $map=$navmap->getResourceByUrl($sequence);
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     $r->print("geto ".scalar(@resources)."<br />");