';
-# $result.='To assign the same score for all the students use the radio buttons or '.
-# 'text box below. To assign scores individually fill in the score boxes for '.
-# 'each student in the table below. A part that has already '.
-# 'been graded does not get changed using the radio buttons or text box. '.
-# 'If needed, it has to be changed individually.';
-# $result.='
';
#radio buttons/text box for assigning points for a section or class.
#handles different parts of a problem
my ($partlist,$handgrade) = &response_type($ENV{'form.url'});
@@ -1884,10 +1878,8 @@ sub editgrades {
my $symb=$ENV{'form.symb'};
my $url =$ENV{'form.url'};
my $title='
'."\n".
+ &show_grading_menu_form ($symb,$url);
my $msg = 'Number of records updated = '.$rec_update.
' for '.$count.' student'.($count <= 1 ? '' : 's').'. '.
'Total number of students = '.$ENV{'form.total'}.' ';
@@ -2025,6 +2018,48 @@ sub split_part_type {
#
#-------------------------- Next few routines handles grading by csv upload
#
+#--- Menu to upload a csv scores ---
+sub upcsvScores_form {
+ my ($request) = shift;
+ my ($symb,$url)=&get_symb_and_url($request);
+ if (!$symb) {return '';}
+ my $result =<
+ function checkUpload(formname) {
+ if (formname.upfile.value == "") {
+ alert("Please use the browse button to select a file from your local directory.");
+ return false;
+ }
+ formname.submit();
+ if (navigator.appName !="Netscape") {self.close()}; //if netscape if appears to close before submit!!!
+ // any suggestion how to get around this??
+ }
+
+CSVFORMJS
+ $ENV{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
+ $result.='
'."\n";
+ $result.='
'."\n";
+ $result.=' Specify a file containing the class scores for problem - '.$ENV{'form.probTitle'}.
+ '.
';
my ($partlist,$handgrade) = &response_type($url);
my ($resptype,$hdgrade)=('','no');
for (sort keys(%$handgrade)) {
@@ -2141,6 +2175,9 @@ to this page if the data selected is ins
value="$ENV{'form.upfile_associate'}" />
+
+
+
'."\n";
-
- $result.='
'."\n";
- $result.='
'."\n";
- $result.=' Specify a file containing the class scores for above resource
'."\n";
- return $result;
-}
-
-#--- Handgrading problems by page/sequence for each student ---
-sub gradeByPage_form {
- my ($symb,$url,$response,$handgrade) = @_;
- my ($classlist,$sections) = &getclasslist('all','0');
- my $result.='
'."\n";
- $result.='
'."\n";
- $result.=' ';
- $result.='Handgrade an Individual Student\'s by Page/Sequence
'."\n";
- $result.='
'."\n";
- $result.=''."\n";
- $result.='
'."\n";
- $result.='
'."\n";
- return $result;
-}
-
+#-------------- Next few routines handles grading by page/sequence
+#
+#--- Select a page/sequence and a student to grade
sub pickStudentPage {
my ($request) = shift;
@@ -2470,8 +2338,7 @@ function radioSelection(radioButton) {
var selection=null;
for (var i=0; i
LISTJAVASCRIPT
- my ($symb,$url) = &get_symb_and_url();
+ my ($symb,$url) = &get_symb_and_url($request);
my $cdom = $ENV{"course.$ENV{'request.course.id'}.domain"};
my $cnum = $ENV{"course.$ENV{'request.course.id'}.num"};
my $getsec = $ENV{'form.section'} eq '' ? 'all' : $ENV{'form.section'};
@@ -2499,7 +2365,7 @@ LISTJAVASCRIPT
$result.='