version 1.62, 2011/01/10 00:06:28
|
version 1.64, 2011/01/21 16:28:32
|
Line 141 sub startGradeScreen {
|
Line 141 sub startGradeScreen {
|
&mt('Spreadsheet (Detailed)').'</b></a></li>'); |
&mt('Spreadsheet (Detailed)').'</b></a></li>'); |
} |
} |
if ($allowed_to_view) { |
if ($allowed_to_view) { |
|
$r->print("\n".'<li'.($mode eq 'statistics'?' class="active"':'').'><a href="/adm/statistics"><b>'. |
|
&mt('Statistics and Reports').'</b></a></li>'); |
|
|
$r->print("\n".'<li'.($mode eq 'chart'?' class="active"':'').'><a href="/adm/statistics?reportSelected=student_assessment"><b>'. |
$r->print("\n".'<li'.($mode eq 'chart'?' class="active"':'').'><a href="/adm/statistics?reportSelected=student_assessment"><b>'. |
&mt('Assessment Overview Chart').'</b></a></li>'); |
&mt('Assessment Overview Chart').'</b></a></li>'); |
|
|
Line 405 sub outputCategories {
|
Line 408 sub outputCategories {
|
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_; |
$navmap,$totalParts,$totalPossible,$totalRight,$totalAttempted,$topLevelParts,$topLevelRight,$topLevelAttempted)=@_; |
# Take care of storing and retrieving categories |
# Take care of storing and retrieving categories |
|
|
|
my $cangrade=&Apache::lonnet::allowed('mgr'); |
|
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my %categories=(); |
my %categories=&Apache::lonnet::dump('grading_categories',$cdom,$cnum); |
# Storing |
|
if (($cangrade) && ($env{'form.storechanges'})) { |
|
|
|
# Actually store |
|
&Apache::lonnet::put('grading_categories',\%categories,$cdom,$cnum); |
|
} else { |
|
# Loading |
|
%categories=&Apache::lonnet::dump('grading_categories',$cdom,$cnum); |
|
} |
# categories loaded now |
# categories loaded now |
|
# Form only generated if user can change the grading categories |
|
if ($cangrade) { |
|
$r->print('<form method="post">'); |
|
} |
|
# |
|
# Business logic here |
|
# |
|
if ($cangrade) { |
|
$r->print('<input type="submit" name="storechanges" value="'.&mt("Save changes to grading categories").'" /></form>'); |
|
} |
} |
} |
|
|
# Pass this two refs to arrays for the start and end color, and a number |
# Pass this two refs to arrays for the start and end color, and a number |