Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Grade calculations.

Grade calculations: Difference between revisions

From MoodleDocs
m (Edit grade calculation moved to Grade calculations)
(Calculations when user language is not English)
Line 2: Line 2:




==Enabling Calculations==
==Enabling calculations==
[[Image:Calc.JPG|thumb|"Show Calculations" Icon]][[Image:Calc_icon.JPG|thumb|Little calculator symbol]]To enable calculations for you gradebook:
[[Image:Calc.JPG|thumb|"Show Calculations" Icon]][[Image:Calc_icon.JPG|thumb|Little calculator symbol]]To enable calculations for you gradebook:
# Login as teacher or other user with permission to edit grades.
# Login as teacher or other user with permission to edit grades.
Line 11: Line 11:
# Click the little calculator symbol under Course Total column which will bring you to the calculations page.
# Click the little calculator symbol under Course Total column which will bring you to the calculations page.


==Assigning ID Numbers==
==Assigning ID numbers==
ID numbers are similar to nicknames for each grade item. In a calculation, instead of referring back to a whole assignment name, we can substitute it for it's ID number which becomes a lot easier. Think of it as substituting 143 as X and then using X for various math problems.
ID numbers are similar to nicknames for each grade item. In a calculation, instead of referring back to a whole assignment name, we can substitute it for it's ID number which becomes a lot easier. Think of it as substituting 143 as X and then using X for various math problems.


ID numbers on the bottom of the page. Use simple to remember numbers or variables like 1, X, or Quiz1. Remember to click "Add id numbers"!
ID numbers on the bottom of the page. Use simple to remember numbers or variables like 1, X, or Quiz1. Remember to click "Add id numbers"!


==Understanding Calculation Functions==
==Understanding calculation functions==
Click the yellow question mark next to the word "Calculation". This will bring a pop-up explaining the various functions that can be used in calculations and how to use them.
Click the yellow question mark next to the word "Calculation". This will bring a pop-up explaining the various functions that can be used in calculations and how to use them.


Line 56: Line 56:
* exp
* exp


==Making your Calculation==
==Making your calculation==
[[Image:Final_calc.JPG|thumb|Example calculation]]
[[Image:Final_calc.JPG|thumb|Example calculation]]
Back on the calculations page, start typing the various functions and the ID numbers chosen for your calculation.
Back on the calculations page, start typing the various functions and the ID numbers chosen for your calculation.
Line 65: Line 65:
# Separate each ID number with a comma; Example: <nowiki>=sum([[item1]],[[item2]],[[item3]])</nowiki>
# Separate each ID number with a comma; Example: <nowiki>=sum([[item1]],[[item2]],[[item3]])</nowiki>
# Click the "Save Changes" button.
# Click the "Save Changes" button.
==Calculations when user language is not English==
Calculation formulas use decimal and list separators as defined in each language pack.
The decimal separator (a symbol used to mark the boundary between the integral and the fractional parts of a decimal number) is a point (.) in English. In other languages it may be a comma (,).
The list separator (a symbol used to separate a list of ID numbers in square brackets) is a comma (,) in English. In other languages it may be a semicolon (;).


==See also==
==See also==
*[http://www.youtube.com/watch?v=WKUGyzAXcyA Video on how to set up calculations in the gradebook (basic)]
*[http://www.youtube.com/watch?v=WKUGyzAXcyA Video on how to set up calculations in the gradebook (basic)]
*[http://www.youtube.com/watch?v=VBEj8mmu8lM Video on how to set up calculations in the gradebook (advanced)]
*[http://www.youtube.com/watch?v=VBEj8mmu8lM Video on how to set up calculations in the gradebook (advanced)]

Revision as of 15:21, 14 March 2008

A grade calculation is a formula used to determine grades, based (optionally) on other grade items. Note that this is not the same as Calculated question types.


Enabling calculations

"Show Calculations" Icon
Little calculator symbol

To enable calculations for you gradebook:

  1. Login as teacher or other user with permission to edit grades.
  2. Go to course.
  3. Click on Grades in the Administration block.
  4. Click the "Turn Editing On" button on the top right corner.
  5. Click the "Show Calculations" icon on the middle top.
  6. Click the little calculator symbol under Course Total column which will bring you to the calculations page.

Assigning ID numbers

ID numbers are similar to nicknames for each grade item. In a calculation, instead of referring back to a whole assignment name, we can substitute it for it's ID number which becomes a lot easier. Think of it as substituting 143 as X and then using X for various math problems.

ID numbers on the bottom of the page. Use simple to remember numbers or variables like 1, X, or Quiz1. Remember to click "Add id numbers"!

Understanding calculation functions

Click the yellow question mark next to the word "Calculation". This will bring a pop-up explaining the various functions that can be used in calculations and how to use them.

Every calculation must start with an equal sign (=). Following is a list of the functions supported by the calculation. The comma (,) character is used to separate arguments within function brackets. The comma can also be used to separate different functions.

  • average([[item1]], [[item2]]...): Returns the average of a sample
  • max([[item1]], [[item2]]...): Returns the maximum value in a list of arguments
  • min([[item1]], [[item2]]...): Returns the minimum value in a list of arguments
  • mod(dividend, divisor): Calculates the remainder of a division
  • pi(): Returns the value of the number Pi
  • power(base, power): Raises a number to the power of another
  • round(number, count): Rounds a number to a predefined accuracy
  • sum([[item1]], [[item2]]...): Returns the sum of all arguments

A number of mathematical functions is also supported:

  • sin
  • sinh
  • arcsin
  • asin
  • arcsinh
  • asinh
  • cos
  • cosh
  • arccos
  • acos
  • arccosh
  • acosh
  • tan
  • tanh
  • arctan
  • atan
  • arctanh
  • atanh
  • sqrt
  • abs
  • ln
  • log
  • exp

Making your calculation

Example calculation

Back on the calculations page, start typing the various functions and the ID numbers chosen for your calculation.

  1. Start with an equal sign (=)
  2. Choose a function; Example: =sum()
  3. Plug in your ID numbers enclosed in 2 hard brackets; Example: =sum([[item1]][[item2]][[item3]])
  4. Separate each ID number with a comma; Example: =sum([[item1]],[[item2]],[[item3]])
  5. Click the "Save Changes" button.

Calculations when user language is not English

Calculation formulas use decimal and list separators as defined in each language pack.

The decimal separator (a symbol used to mark the boundary between the integral and the fractional parts of a decimal number) is a point (.) in English. In other languages it may be a comma (,).

The list separator (a symbol used to separate a list of ID numbers in square brackets) is a comma (,) in English. In other languages it may be a semicolon (;).

See also