Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14274

Make it possible to add conditions (IF) to grade calculations

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. As Admin create a course.
      2. Enrol a Teacher and at least one student in the course.
      3. As Admin/Teacher enter gradebook setup.
      4. Add two grade items named "item1" and "item2".
      5. For the "Course total" edit calculation.
      6. Add ID numbers "item1" and "item2".
      7. Enter in the Calculation text area the formula "=if([[item1]]>50,[[item2]],22)"
      8. Go to "Grader report" and "Turn editing on".
      9. Enter manually the grade into item1 and item2 with values 25, 99.
      10. Save grades.
      11. Course total should be 22.00
      12. Enter manually the grade into item1 and item2 with values 55, 99.
      13. Save grades.
      14. Course total should be 99.00
      Show
      As Admin create a course. Enrol a Teacher and at least one student in the course. As Admin/Teacher enter gradebook setup. Add two grade items named "item1" and "item2". For the "Course total" edit calculation. Add ID numbers "item1" and "item2". Enter in the Calculation text area the formula "=if([ [item1] ]>50,[ [item2] ],22)" Go to "Grader report" and "Turn editing on". Enter manually the grade into item1 and item2 with values 25, 99. Save grades. Course total should be 22.00 Enter manually the grade into item1 and item2 with values 55, 99. Save grades. Course total should be 99.00
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-14274-master

      Description

      I understand that when calculating the grade for a category or total grade in moodle 1.9, it is possible to use various formulas:

      http://moodle.org/help.php?module=grade&file=calculation.html

      However, it does not appear to be possible to use an IF formula (condition) as can be done in Excel.

      It would be very useful to be able to calculate the total of x number of graded activities, but not include the scores of those activities that are less than a certain %.

      So for example, if there are three graded activities for which students must get 50% or more, the formula in Excel would be as follows:

      =SUM((IF(A1>=50,A1,0))+IF(B1>=50,B1,0)+IF(C1>=50,C1,0))

      where A1, B1, & C1 are the three graded activities. Here, A1, A2 & A3 are added together, but if the score of any one activity falls below 50%, it is treated as 0%.

      For example:

      student1
      activityA1: 30
      activityA2: 80
      activityA3: 70
      Total: 150 (Not 180)

      the total for student1 is only 150 (not 180) because his score for quizA1 is less than 50, and so is treated as zero, so 0+80+70=150

      I know it's possible to indicate a "Grade to pass" for any item or category, but this seems to only change the background colour of a score: green for pass, red for fail. It does not effect the category score to which that item belongs.

      So, I can see three possible ways of achieving this goal:
      1) make it possible to use the 'IF' function in the gradebook as in Excel
      2) make it possible to remove from the total calculation any grade that falls below the designated 'Grade to pass": this should be an option, not automatic
      3) make it possible for each activity module to return 0% to the gradebook if the score falls below a specified amount - probably the least practical solution

      Why would this feature be useful?
      Short answer = motivation
      In activities that students can do (i.e. submit) more than once, they would be 'encouraged' to achieve more than a bare minimum. For example, in a course in which there were many quizzes, it would be possible for a student to pass by doing very well in just a few quizzes, and then doing lots of other quizzes badly. Yes, their average would be pulled down, but because they had done a few very well, their average may still be high enough to pass. Allowing the teacher to specify a grade below which certain activities must not fall will assist teachers to motivate their students.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                43 Vote for this issue
                Watchers:
                35 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m