--- loncom/interface/lonwhatsnew.pm 2005/06/09 18:41:08 1.21 +++ loncom/interface/lonwhatsnew.pm 2005/07/14 21:30:25 1.24 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.21 2005/06/09 18:41:08 albertel Exp $ +# $Id: lonwhatsnew.pm,v 1.24 2005/07/14 21:30:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,7 @@ use Apache::lonnavmaps(); use Apache::lonuserstate; use Apache::Constants qw(:common :http); use Time::Local; +use GDBM_File; #---------------------------- # handler @@ -178,9 +179,9 @@ sub display_actions_box() { } my %threshold = ( - av_attempts => 0, - degdiff => 0.01, - numstudents => 0, + av_attempts => 2, + degdiff => 0.5, + numstudents => 2, ); my $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain); @@ -190,10 +191,12 @@ sub display_actions_box() { $r->print('
You are accessing an invalid course.


'); return; } - - my ($furl,$ferr)= - &Apache::lonuserstate::readmap($cdom.'/'.$crs); - $r->print('Go to first resource
Change your preferences
to suppress display of this screen when accessing courses as Course Coordinator in the future.

'); + if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db', + &GDBM_READER(),0640)) { + my $furl=$bighash{'first_url'}; + $r->print('Go to first resource
Change your preferences
to suppress display of this screen when accessing courses as Course Coordinator in the future.

'); + untie(%bighash); + } my $result; @@ -264,7 +267,7 @@ END @bombs = sort { &cmp_title($a,$b,\%res_title) } @bombs; foreach my $bomb (@bombs) { if ($bombnum %2 == 1) { - $rowColor = $rowColor1; + $rowColor = $rowColor1; } else { $rowColor = $rowColor2; } @@ -567,35 +570,35 @@ sub getitems { foreach my $value (values(%{$handgrade})) { if ($value eq 'yes') { $handgradeable=1; last; } } - next if (!$handgradeable); - - foreach my $student (keys(%$classlist)) { - my ($uname,$udom) = split(/:/,$student); - my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist); - my $submitted = 0; - my $ungraded = 0; - foreach (keys(%status)) { - $submitted = 1 if ($status{$_} ne 'nothing'); - $ungraded = 1 if ($status{$_} =~ /^ungraded/); - my ($foo,$partid,$foo1) = split(/\./,$_); - if ($status{'resource.'.$partid.'.submitted_by'} ne '') { - $submitted = 0; - } - } - next if (!$submitted || !$ungraded); - $ctr ++; - } - if ($ctr) { - $$ungraded{$symb}{count} = $ctr; - $$ungraded{$symb}{title} = $title; - push(@{$tograde}, $symb); - } + if ($handgradeable) { + foreach my $student (keys(%$classlist)) { + my ($uname,$udom) = split(/:/,$student); + my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist); + my $submitted = 0; + my $ungraded = 0; + foreach (keys(%status)) { + $submitted = 1 if ($status{$_} ne 'nothing'); + $ungraded = 1 if ($status{$_} =~ /^ungraded/); + my ($foo,$partid,$foo1) = split(/\./,$_); + if ($status{'resource.'.$partid.'.submitted_by'} ne '') { + $submitted = 0; + } + } + next if (!$submitted || !$ungraded); + $ctr ++; + } + if ($ctr) { + $$ungraded{$symb}{count} = $ctr; + $$ungraded{$symb}{title} = $title; + push(@{$tograde}, $symb); + } + } } # Check for bombs if ($resource->getErrors()) { my $errors = $resource->getErrors(); - $errors =~ s/^,//; + $errors =~ s/^,//; my @bombs = split(/,/, $errors); my $errorcount = scalar(@bombs); my $errorlink = '