Moodle
  1. Moodle
  2. MDL-14840

Cannot import grades when using non-numeric scale

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.3
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      30902

      Description

      I cannot import grades when I am using a non-numeric Scale. I have a scale with 3 items (Not Attempted, Attempted, Completed). These are the steps I have taken to import the grades:
      1. Graded one student
      2. Exported the file to CSV
      3. Altered the exported file to include the other student's grades
      4. Import the modified file
      5. Throw my hands in the air when reading the error message 'Supplied grade is invalid'

      This error also occurs when using the Satisfactory/Not Satisfactory standard scale although using numeric scales works a treat.

      Attached is the error I am getting with other screen shots of the Custom scale I was using at the time and file import preview screen. I have found a temporary work-around as outlined below but that is not really ideal
      1. Change the grading in each Moodle assignment to be out of 3
      2. Alter the csv file to have the grades 1, 2 & 3 (3=being Completed; 2=Attempted & 1=Not Attempted)
      3. Import the file
      4. Change the grading in each Moodle assignment back to your custom scale

      1. customScaleGradesErr.gif
        42 kB
      2. screenshot-1.jpg
        156 kB
      3. screenshot-2.jpg
        296 kB

        Issue Links

          Activity

          Hide
          Mike McDermott added a comment -

          I have exactly the same problem. It is really important to get this fixed.

          Set a scale as Pass, Fail, Distinction etc.

          Try to upload these grades from csv and it is not possible, Upload 1,2,3 etc, and it will come out as Pass, Fail, Distinction. That causes confusion.

          The grades in the CSV file need to be exactly the same as they appear in the course. Obviously if a grade has not been set up in the scale, it should not then be possible to upload it.,

          Show
          Mike McDermott added a comment - I have exactly the same problem. It is really important to get this fixed. Set a scale as Pass, Fail, Distinction etc. Try to upload these grades from csv and it is not possible, Upload 1,2,3 etc, and it will come out as Pass, Fail, Distinction. That causes confusion. The grades in the CSV file need to be exactly the same as they appear in the course. Obviously if a grade has not been set up in the scale, it should not then be possible to upload it.,
          Hide
          Mohammed Abdulaziz added a comment -

          Am also experiencing the same problem...

          Yes if the scale is "complete" or "not complete" then it is ok to use the numeric scale on the CSV as there are only 2 choices of grades.

          But if the scale exceeds 12 or 14 level of grades then it's not practical to use the numeric scale within CSV.

          Any solutions to this problem

          Show
          Mohammed Abdulaziz added a comment - Am also experiencing the same problem... Yes if the scale is "complete" or "not complete" then it is ok to use the numeric scale on the CSV as there are only 2 choices of grades. But if the scale exceeds 12 or 14 level of grades then it's not practical to use the numeric scale within CSV. Any solutions to this problem
          Hide
          Daljeet Soor added a comment -

          Grade Book Help Required!?

          The CSV file being is the most easiest way to upload grades, obviously if different assignments use different scales- it is going to be ever so confusing to know that numeric inputs equal a possible assigned text orientated grade.

          Can the grade entered via the CSV file not correspond to the scales applied by each assignment?

          Show
          Daljeet Soor added a comment - Grade Book Help Required!? The CSV file being is the most easiest way to upload grades, obviously if different assignments use different scales- it is going to be ever so confusing to know that numeric inputs equal a possible assigned text orientated grade. Can the grade entered via the CSV file not correspond to the scales applied by each assignment?
          Hide
          Nathan Cobb added a comment -

          I have the same problem. I don't think I can add much to previous comments. Pretty much everything here relies on a non-numerical scale. Any way of resolving this would be greatly appreciated.

          Show
          Nathan Cobb added a comment - I have the same problem. I don't think I can add much to previous comments. Pretty much everything here relies on a non-numerical scale. Any way of resolving this would be greatly appreciated.
          Hide
          Martin Dougiamas added a comment -

          Hi Petr, can we make this a priority? (either you or Nicolas)

          Show
          Martin Dougiamas added a comment - Hi Petr, can we make this a priority? (either you or Nicolas)
          Hide
          Petr Škoda added a comment -

          ok

          Show
          Petr Škoda added a comment - ok
          Hide
          Petr Škoda added a comment -

          fixed in cvs,
          I have also added option to use tabs and there is also an option for backwards compatibility
          please test and reopen if needed

          thanks for the report

          Show
          Petr Škoda added a comment - fixed in cvs, I have also added option to use tabs and there is also an option for backwards compatibility please test and reopen if needed thanks for the report
          Hide
          Jamie Tinley added a comment -

          Hi Petr,

          I see you solved it but I don't understand the solution - is this an update in moodle 1.9? Or a fix we can add? I assume you mean CSV not cvs, yes? please explain how to obtain your solution. Thanks, James

          Show
          Jamie Tinley added a comment - Hi Petr, I see you solved it but I don't understand the solution - is this an update in moodle 1.9? Or a fix we can add? I assume you mean CSV not cvs, yes? please explain how to obtain your solution. Thanks, James
          Hide
          Petr Škoda added a comment -

          no cvs is a place where we store the source code, you have to install latest 1.9.1+ daily build, update from cvs or wait for the 1.9.2 (which should be released later this week)

          Show
          Petr Škoda added a comment - no cvs is a place where we store the source code, you have to install latest 1.9.1+ daily build, update from cvs or wait for the 1.9.2 (which should be released later this week)
          Hide
          Mike Corb added a comment -

          If you create a grade scale as per the help instructions, separating the keywords with a comma and a space, the import will fail due to the stored scale having a space prepended to each keyword, eg when pasting in from the help text the string "Disappointing, Not good enough, Average, Good, Very good, Excellent!"

          This is because of this line in grade/import/csv/index.php, approx line 382 :
          $scales = explode(',', $scale->scale);

          Returns " Excellent!" instead of "Excellent!"

          So when the following line runs, " Excellent!" with a prepended space is not found.
          $key = array_search($value, $scales);

          Show
          Mike Corb added a comment - If you create a grade scale as per the help instructions, separating the keywords with a comma and a space, the import will fail due to the stored scale having a space prepended to each keyword, eg when pasting in from the help text the string "Disappointing, Not good enough, Average, Good, Very good, Excellent!" This is because of this line in grade/import/csv/index.php, approx line 382 : $scales = explode(',', $scale->scale); Returns " Excellent!" instead of "Excellent!" So when the following line runs, " Excellent!" with a prepended space is not found. $key = array_search($value, $scales);
          Hide
          Dan Marsden added a comment -

          Re-opening bug as Per mikes comments above - Petr - can we please trim the array vars returned by the explode before doing the array_search?

          thanks!

          Dan

          Show
          Dan Marsden added a comment - Re-opening bug as Per mikes comments above - Petr - can we please trim the array vars returned by the explode before doing the array_search? thanks! Dan
          Hide
          Mike McDermott added a comment -

          As per the comments above, the gradebook has been changed so it will accept uploaded non-numeric grades. However there is still one slight flaw. If you upload a grade it will go through, to the final grade but the Grade still shows a numerical format. (with the range as well, e.g. 11/11) This will confuse our lecturers. As some will upload and some will enter manually (where it still reads pass, merit, distinction) then this will cause a problem.

          Please see the screenshot - the 11/11 was uploaded while the others were entered manually.

          Show
          Mike McDermott added a comment - As per the comments above, the gradebook has been changed so it will accept uploaded non-numeric grades. However there is still one slight flaw. If you upload a grade it will go through, to the final grade but the Grade still shows a numerical format. (with the range as well, e.g. 11/11) This will confuse our lecturers. As some will upload and some will enter manually (where it still reads pass, merit, distinction) then this will cause a problem. Please see the screenshot - the 11/11 was uploaded while the others were entered manually.
          Hide
          Petr Škoda added a comment -

          trimming committed, the displaying on grader report is a different issue not related to this, please file a new report if needed
          thanks everybody!

          Show
          Petr Škoda added a comment - trimming committed, the displaying on grader report is a different issue not related to this, please file a new report if needed thanks everybody!
          Hide
          Asaf Meir Barziv added a comment -

          the grades are not editable and the teacher last change is not shwoing.

          Show
          Asaf Meir Barziv added a comment - the grades are not editable and the teacher last change is not shwoing.

            People

            • Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: