version 1.49.6.8.2.5, 2024/01/05 19:50:32
|
version 1.49.6.8.2.6, 2025/01/16 21:11:56
|
Line 203 ENDCLOSE
|
Line 203 ENDCLOSE
|
my $notshowTotals= |
my $notshowTotals= |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'; |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'; |
|
|
|
my $usec; |
|
if ($cangrade) { |
|
if (($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) { |
|
$usec = $env{'request.course.sec'}; |
|
} else { |
|
$usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'}); |
|
} |
|
} else { |
|
$usec = $env{'request.course.sec'}; |
|
} |
|
|
my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts, |
my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts, |
$topLevelRight,$topLevelAttempted) = &getData($showPoints,$uname,$udom); |
$topLevelRight,$topLevelAttempted) = &getData($showPoints,$uname,$udom,$usec); |
|
|
if (ref($navmap)) { |
if (ref($navmap)) { |
my $nostdtotals; |
my $nostdtotals; |
Line 214 ENDCLOSE
|
Line 225 ENDCLOSE
|
if ($hidetotals eq 'all') { |
if ($hidetotals eq 'all') { |
$nostdtotals = 1; |
$nostdtotals = 1; |
} elsif ($hidetotals ne '') { |
} elsif ($hidetotals ne '') { |
my $usec; |
|
if ($cangrade) { |
|
if (($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) { |
|
$usec = $env{'request.course.sec'}; |
|
} else { |
|
$usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'}); |
|
} |
|
} else { |
|
$usec = $env{'request.course.sec'}; |
|
} |
|
if ($usec ne '') { |
if ($usec ne '') { |
my %secnototals; |
my %secnototals; |
map { $secnototals{$_} = 1; } split(/,/,$hidetotals); |
map { $secnototals{$_} = 1; } split(/,/,$hidetotals); |
Line 277 sub grades_blocked {
|
Line 278 sub grades_blocked {
|
|
|
sub getData { |
sub getData { |
|
|
my ($showPoints,$uname,$udom)=@_; |
my ($showPoints,$uname,$udom,$usec)=@_; |
|
|
# Create the nav map |
# Create the nav map |
my $navmap = Apache::lonnavmaps::navmap->new($uname,$udom); |
my $navmap = Apache::lonnavmaps::navmap->new($uname,$udom,$usec); |
|
|
if (!defined($navmap)) { |
if (!defined($navmap)) { |
return (); |
return (); |