1. Decide what is the point limit for passing (for example 20 p/ 40 p).
2. Create a new category

- Grades tab and from the left side menu Gradebook setup

- Up right menu choose Add Category
- Give an informative name to the New Category e.g. Exam grade
- Change Grade type to Scale and choose the scale Fail / Pass and Save

Move quiz/quizes to the new category
- Select Quiz/Quizes
- Choose on bottom of the page Move and select the new category

Next we define the function to that Exam grade category.
- Choose Edit menu (three dots) > Edit calculation from the category line

First we must add the ID to the quiz
- write the ID name (can be letters or/and numbers). ID is visible only to teachers. Here we use exam1 and exam2
- Save IDs by choosing Add ID numbers on the bottom
- After saving IDs are like this: [[exam1]]

- Write to the Grade item Calculation field function like this
- One exam: =if([[exam1]]>=20,2,1), where the 10 is the point limit for passing.
- Two exams: =if(max([[exam1]],[[exam1]])>=20,2,1)
This function can be read like this:
"If quiz points are at least 20, then 2 (=pass) is given, otherwise 1 (=fail)"
or
"If max points of exam1 and exam2 is at least 20, then 2 (=pass) is given, otherwise 1 (=fail)"
- If you have Finnish language in use in Moodle function is written =if([[exam1]]>=20;2;1)
- Save changes

After these settings Gradebook transfers the Quiz points automatically to the scale Fail / Pass in the gradebook.
