version 1.118, 2020/09/01 03:35:54
|
version 1.120, 2021/02/18 14:48:02
|
Line 129 sub real_handler {
|
Line 129 sub real_handler {
|
my $preamble = '<div id="LC_update_'.$cid.'" class="LC_info">'. |
my $preamble = '<div id="LC_update_'.$cid.'" class="LC_info">'. |
'<br />'. |
'<br />'. |
&mt('Your course session is being updated because of recent changes by course personnel.'). |
&mt('Your course session is being updated because of recent changes by course personnel.'). |
' '.&mt('Please be patient.').'<br /></div>'. |
' '.&mt('Please be patient').'.<br /></div>'. |
'<div style="padding:0;clear:both;margin:0;border:0"></div>'; |
'<div style="padding:0;clear:both;margin:0;border:0"></div>'; |
%prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble); |
%prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble); |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course')); |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Updating course')); |
$r->rflush(); |
$r->rflush(); |
my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum"); |
my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum"); |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished')); |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished!')); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
my $closure = <<ENDCLOSE; |
my $closure = <<ENDCLOSE; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 246 ENDCLOSE
|
Line 246 ENDCLOSE
|
my $showCategories= |
my $showCategories= |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'; |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'; |
|
|
my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)= |
my ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts, |
&getData($showPoints,$uname,$udom); |
$topLevelRight,$topLevelAttempted) = &getData($showPoints,$uname,$udom); |
|
|
if (ref($navmap)) { |
if (ref($navmap)) { |
if ($showCategories) { |
if ($showCategories) { |
&outputCategories($r,$showPoints,$notshowTotals, |
&outputCategories($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible, |
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted); |
$totalRight,$totalAttempted,$topLevelParts,$topLevelRight, |
|
$topLevelAttempted); |
} else { |
} else { |
&outputTable($r,$showPoints,$notshowTotals, |
&outputTable($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible, |
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted); |
$totalRight,$totalAttempted,$topLevelParts,$topLevelRight, |
|
$topLevelAttempted); |
} |
} |
} else { |
} else { |
if ($cangrade) { $r->print("\n</form>\n"); } |
if ($cangrade) { $r->print("\n</form>\n"); } |
Line 266 ENDCLOSE
|
Line 268 ENDCLOSE
|
if ($cangrade) { $r->print("\n</form>\n"); } |
if ($cangrade) { $r->print("\n</form>\n"); } |
&endGradeScreen($r); |
&endGradeScreen($r); |
return OK; |
return OK; |
|
|
} |
} |
|
|
sub grades_blocked { |
sub grades_blocked { |
Line 338 sub startGradeScreen {
|
Line 339 sub startGradeScreen {
|
(($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external') |
(($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external') |
|| ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals') |
|| ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals') |
|| ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories')); |
|| ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories')); |
my $notshowTotals= |
my $notshowTotals = |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'; |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'; |
my $showSPRSlink = |
my $showSPRSlink = |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet'; |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'spreadsheet'; |
my $showCategories= |
my $showCategories = |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'; |
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'; |
|
|
my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
Line 402 sub startGradeScreen {
|
Line 403 sub startGradeScreen {
|
} |
} |
|
|
sub endGradeScreen { |
sub endGradeScreen { |
my ($r)=@_; |
my ($r)=@_; |
$r->print('</div></div></div>'.&Apache::loncommon::end_page()); |
$r->print('</div></div></div>'.&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
# ----------- |
# ----------- |
Line 487 sub getData {
|
Line 488 sub getData {
|
my $depth = 1; |
my $depth = 1; |
$iterator->next(); # ignore first BEGIN_MAP |
$iterator->next(); # ignore first BEGIN_MAP |
my $curRes = $iterator->next(); |
my $curRes = $iterator->next(); |
|
|
# General overview of the following: Walk along the course resources. |
# General overview of the following: Walk along the course resources. |
# For every problem in the resource, tell its parent maps how many |
# For every problem in the resource, tell its parent maps how many |
# parts and how many parts correct it has. After that, each map will |
# parts and how many parts correct it has. After that, each map will |
Line 601 sub getData {
|
Line 602 sub getData {
|
} |
} |
$curRes = $iterator->next(); |
$curRes = $iterator->next(); |
} |
} |
return ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted); |
return ($navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted, |
|
$topLevelParts,$topLevelRight,$topLevelAttempted); |
} |
} |
|
|
# |
# |
Line 610 sub getData {
|
Line 612 sub getData {
|
|
|
sub outputTable { |
sub outputTable { |
|
|
my ($r,$showPoints,$notshowTotals, |
my ($r,$showPoints,$notshowTotals,$navmap,$totalParts,$totalPossible,$totalRight, |
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_; |
$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_; |
|
|
my @start = (255, 255, 192); |
my @start = (255, 255, 192); |
my @end = (0, 192, 0); |
my @end = (0, 192, 0); |