--- loncom/homework/grades.pm 2010/03/21 18:31:45 1.601
+++ loncom/homework/grades.pm 2010/03/25 19:56:33 1.602
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.601 2010/03/21 18:31:45 www Exp $
+# $Id: grades.pm,v 1.602 2010/03/25 19:56:33 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -214,55 +214,6 @@ sub get_display_part {
return $display;
}
-#--- Show resource title
-#--- and parts and response type
-#sub showResourceInfo {
-# my ($symb,$probTitle,$checkboxes,$res_error) = @_;
-# my $result = '
'.&mt('Current Resource').': '.$probTitle.'
'."\n";
-# my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error);
-# if (ref($res_error)) {
-# if ($$res_error) {
-# return;
-# }
-# }
-# $result.=&Apache::loncommon::start_data_table()
-# .&Apache::loncommon::start_data_table_header_row();
-# if ($checkboxes) {
-# $result.=' | ';
-# }
-# $result.=''.&mt('Problem Part').' | '
-# .''.&mt('Res. ID').' | '
-# .''.&mt('Type').' | '
-# .&Apache::loncommon::end_data_table_header_row();
-# my %resptype = ();
-# my $hdgrade='no';
-# my %partsseen;
-# foreach my $partID (sort(keys(%$responseType))) {
-# foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) {
-# my $handgrade=$$handgrade{$partID.'_'.$resID};
-# my $responsetype = $responseType->{$partID}->{$resID};
-# $hdgrade = $handgrade if ($handgrade eq 'yes');
-# $result.=&Apache::loncommon::start_data_table_row();
-# if ($checkboxes) {
-# if (exists($partsseen{$partID})) {
-# $result.=" | ";
-# } else {
-# $result.=" | ";
-# }
-# $partsseen{$partID}=1;
-# }
-# my $display_part=&get_display_part($partID,$symb);
-# $result.=''.$display_part.' | '
-# .''.''.$resID.' | '
-# .''.&mt($responsetype).' | '
-# .''.&mt('Handgrade: [_1]',$handgrade).' | '
-# .&Apache::loncommon::end_data_table_row();
-# }
-# }
-# $result.=&Apache::loncommon::end_data_table();
-# return $result,$responseType,$hdgrade,$partlist,$handgrade;
-#}
-
sub reset_caches {
&reset_analyze_cache();
&reset_perm();
@@ -776,6 +727,16 @@ sub most_similar {
#------------------------------------ Receipt Verification Routines
#
+
+sub initialverifyreceipt {
+ my $request = shift;
+ &commonJSfunctions($request);
+ $request->print('\n");
+}
+
#--- Check whether a receipt number is valid.---
sub verifyreceipt {
my $request = shift;
@@ -885,7 +846,6 @@ sub listStudents {
.&mt("$viewgrade Submissions for a Student or a Group of Students")
.'';
-# my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($symb,$env{'form.probTitle'},($env{'form.showgrading'} eq 'yes'));
my ($partlist,$handgrade,$responseType) = &response_type($symb
#,$res_error
);
@@ -8521,7 +8481,6 @@ sub grading_menu {
if (!$symb) {return '';}
my $probTitle = &Apache::lonnet::gettitle($symb);
-# $request->print($table);
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb),
'probTitle'=>$probTitle,
'command'=>'individual',
@@ -8547,6 +8506,9 @@ sub grading_menu {
$fields{'command'} = 'scantron_selectphase';
my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+
+ $fields{'command'} = 'initialverifyreceipt';
+ my $url5 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
my @menu = ({ categorytitle=>'Hand Grading',
items =>[
@@ -8595,69 +8557,27 @@ sub grading_menu {
permission => 'F',
icon => 'stat.png',
linktitle => 'Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.'
- }
+ },
+ { linktext => 'Verify Receipt No.',
+ url => $url5,
+ permission => 'F',
+ icon => 'edit-find-replace.png',
+ linktitle => 'Verify a system-generated receipt number for correct problem solution.'
+ }
+
]
});
- #$fields{'command'} = 'verify';
- #$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
- #
# Create the menu
my $Str;
- # $Str .= ''.&mt('Please select a grading task').'
';
$Str .= '\n";
- my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box.");
- $request->print(&Apache::lonhtmlcommon::scripttag(<print(&processHandGrade($request));
} elsif ($command eq 'editgrades' && $perm{'mgr'}) {
$request->print(&editgrades($request));
+ } elsif ($command eq 'initialverifyreceipt' && $perm{'vgr'}) {
+ $request->print(&initialverifyreceipt($request));
} elsif ($command eq 'verify' && $perm{'vgr'}) {
$request->print(&verifyreceipt($request));
} elsif ($command eq 'processclicker' && $perm{'mgr'}) {