How to calculate late exam in the gradebook

Re: How to calculate late exam in the gradebook

by Mark McKay -
Number of replies: 7
Hi Miki,

You could create a subcategory and change the category total to a custom calculation that looks at the second, and takes that score unless it's empty.

Mark
In reply to Mark McKay

Tárgy: Re: How to calculate late exam in the gradebook

by Zoltán Szalay -

Hi Mark, 

I have exactly the same problem as Miki, but I am not sure which exam I should take into a subcategory. 

I have a main grade category which wears the name of the course and I use natural aggregation in it. I have two subcategories such as exams and homeworks. The exams subcategory involves two items, the main exam and the second exam. 

So my question is which item (exam and/or the second exam) I should take into a new subcategory? Should I use a custom calculation in exams subcategrory which is directed to the second exam item? In this case, does the moodle take only into account the second exam item if the point is filled out?

Thank you in advance for your answer.

Best regards, 

Zoltán 


In reply to Zoltán Szalay

Re: Tárgy: Re: How to calculate late exam in the gradebook

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Both exams should go in the subcategory and then the calculation should be written at the category level. Something to the effect of If Exam B is not null, Exam B total ...else Exam A total (that is not correctly formatted - just entered to give you an idea)

In reply to Emma Richardson

Tárgy: Re: Tárgy: Re: How to calculate late exam in the gradebook

by Zoltán Szalay -

Dear Emma,

Thank you for your answer, but I do not know how I could write such a formul, since there is no if-else logical structure in the custom calculation. 

My category structure is the following: 

category named 'Exames' [subcategory named '1.exam' [ item named 'MainExam' (ID: Ex1), item named 'SecondExam' (ID: Ex2),] ]

The subcategory total is calculated by natural aggregation, while the category total is calculated by custom calculation with the following formula: '=[[Ex2] ]' (the space between ] ] is intentional here.)

However this solution is not working correctly. Could you tell me where is the fault?


Best regards, 

Zoltán

In reply to Zoltán Szalay

Re: Tárgy: Re: Tárgy: Re: How to calculate late exam in the gradebook

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Or you might use the max argument.  That would pull the higher of the two scores - would that not achieve the result you are looking for?

In reply to Emma Richardson

Tárgy: Re: Tárgy: Re: Tárgy: Re: How to calculate late exam in the gradebook

by Zoltán Szalay -

Thank you again your answer.

I have written the following custom formula which works correctly as Miki wrote:

= floor( (Ex2+1)/(Ex2+1)*Ex2 + Ex1*(1-Ex2/(Ex2+0.01)))

Best regards,

Zoltán


In reply to Zoltán Szalay

Re: Tárgy: Re: Tárgy: Re: Tárgy: Re: How to calculate late exam in the gradebook

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Glad you were able to figure it out and thanks for sharing the answer.