--- loncom/homework/grades.pm 2010/03/19 22:00:06 1.600
+++ loncom/homework/grades.pm 2010/03/21 18:31:45 1.601
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.600 2010/03/19 22:00:06 www Exp $
+# $Id: grades.pm,v 1.601 2010/03/21 18:31:45 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8515,18 +8515,6 @@ sub show_grading_menu_form {
return $result;
}
-# -- Retrieve choices for grading form
-sub savedState {
- my %savedState = ();
- if ($env{'form.saveState'}) {
- foreach (split(/:/,$env{'form.saveState'})) {
- my ($key,$value) = split(/=/,$_,2);
- $savedState{$key} = $value;
- }
- }
- return \%savedState;
-}
-
sub grading_menu {
my ($request) = @_;
my ($symb)=&get_symb($request);
@@ -8537,7 +8525,6 @@ sub grading_menu {
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb),
'probTitle'=>$probTitle,
'command'=>'individual',
- 'saveState'=>"",
'gradingMenu'=>1,
'showgrading'=>"yes");
@@ -8623,7 +8610,6 @@ sub grading_menu {
''."\n".
# ''."\n".
''."\n".
- ''."\n".
''."\n".
''."\n";
@@ -8687,64 +8673,18 @@ sub submit_options_sequence {
if (!$symb) {return '';}
&commonJSfunctions($request);
my $result;
- my (undef,$sections) = &getclasslist('all','0');
- my $savedState = &savedState();
- my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'});
- my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'});
- my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'});
- my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'});
-
- # Preselect sections
- my $selsec="";
- if (ref($sections)) {
- foreach my $section (sort(@$sections)) {
- $selsec.=''."\n";
- }
- }
$result.='
';
+ $result .= &show_grading_menu_form($symb);
+ return $result;
+}
-
+sub selectfield {
+ my ($full)=@_;
+ my $result='
-
+ '.&Apache::lonhtmlcommon::StatusOptions(undef,undef,5,undef,'mult').'
+ ';
+ if ($full) {
+ $result.='
-
-
-
-
-
-
-
-
-
-
- ';
- $result .= &show_grading_menu_form($symb);
+ '.
+ &Apache::loncommon::select_form('all','submitonly',
+ (&Apache::lonlocal::texthash(
+ 'yes' => 'with submissions',
+ 'queued' => 'in grading queue',
+ 'graded' => 'with ungraded submissions',
+ 'incorrect' => 'with incorrect submissions',
+ 'all' => 'with any status'),
+ 'select_form_order' => ['yes','queued','graded','incorrect','all'])).
+ '';
+ }
+ $result.='
';
return $result;
}
@@ -9008,13 +8887,11 @@ sub process_clicker {
if (!$symb) {return '';}
my $result=&checkforfile_js();
$env{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
-# my ($table) = &showResourceInfo($symb,$env{'form.probTitle'});
-# $result.=$table;
$result.='
'."\n";
$result.=''."\n";
$result.=' '.&mt('Specify a file containing the clicker information for this resource.').
' | '."\n";
- $result.=''."\n";
+ $result.=' | '."\n";
# Attempt to restore parameters from last session, set defaults if not present
my %Saveable_Parameters=&clicker_grading_parameters();
&Apache::loncommon::restore_course_settings('grades_clicker',
@@ -9490,31 +9367,10 @@ sub handler {
$request->print(&Apache::loncommon::start_page('Grading',undef,
{'bread_crumbs' => $brcrum}));
if ($symb eq '' && $command eq '') {
- if ($env{'user.adv'}) {
- if (($env{'form.codeone'}) && ($env{'form.codetwo'}) &&
- ($env{'form.codethree'})) {
- my $token=$env{'form.codeone'}.'*'.$env{'form.codetwo'}.'*'.
- $env{'form.codethree'};
- my ($tsymb,$tuname,$tudom,$tcrsid)=
- &Apache::lonnet::checkin($token);
- if ($tsymb) {
- my ($map,$id,$url)=&Apache::lonnet::decode_symb($tsymb);
- if (&Apache::lonnet::allowed('mgr',$tcrsid)) {
- $request->print(&ssi_with_retries('/res/'.$url, $ssi_retries,
- ('grade_username' => $tuname,
- 'grade_domain' => $tudom,
- 'grade_courseid' => $tcrsid,
- 'grade_symb' => $tsymb)));
- } else {
- $request->print('Not authorized: '.$token.'');
- }
- } else {
- $request->print('Not a valid DocID: '.$token.'');
- }
- } else {
- $request->print(&Apache::lonxml::tokeninputfield());
- }
- }
+#
+# Not called from a resource
+#
+
} else {
&init_perm();
if ($command eq 'submission' && $perm{'vgr'}) {
|
|