Help with "Calculated Grade"

Help with "Calculated Grade"

by Ricardo Caiado -
Number of replies: 11
Picture of Particularly helpful Moodlers
Hi,

In my course, I have 3 assessments (P1, P2, and PF).

In the Gradebook, a category "MP" was created to store the grades for P1 and P2. The formula for this category is "= (P1 + P2) / 2".

The final course average will be the average of the grades obtained in P1 and P2.

However:

a) If the student misses assessment P1, the grade for P1 will be replaced by the grade for PF.

b) If the student misses assessment P2, the grade for P2 will be replaced by the grade for PF.

c) If the student takes assessments P1 and P2, they will not take assessment PF.

What formula should I enter in "Edit calculation" of the main category so that the final course average reflects these criteria?

Ricardo
In reply to Ricardo Caiado

Help with "Calculated Grade"

by alberto ro -

Hi,

I think that if a grade is missed (eg: P2), then the grade is just P1.

Then you may try a formula to calculate your issue like this:

  • Category where P1and P2 are placed must be named as "C1"
  • Category where PF is place must be named as "C2"
  • a new item of qualification "final" and formula would be:
  • "if(((C1==P1)||(C1==P2))&&(P1|=P2)), (C1+C2)/2, C1)"

 Remind that if your moodle wasn't English version every coma "," must be replace by semicolon ";"

In reply to alberto ro

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Hi, Albert.

Thanks for the reply.

Could you explain "(P1|=P2)". How does it work?

Ricardo
In reply to Ricardo Caiado

Help with "Calculated Grade"

by alberto ro -
the aim to avoid that P1 and P2 were the same; in this case aritmethic media results C1.
In reply to alberto ro

Help with "Calculated Grade"

by alberto ro -
In reply to alberto ro

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Alberto,

Thanks for the reply.

It seems to me that the formula was truncated.

Ricardo
In reply to Ricardo Caiado

Help with "Calculated Grade"

by alberto ro -
One more try.
The aim of the formula is checking category (aritmethic media) against each grade because P1 is missing the category is reduced to P2 and vice versa.
There is a special case when both grades P1,P2 are equal because then category is equal to any individual grade.
So,

if(AND( OR(C1==P1;C1==P2); OR(P1>P2; P1<P2));(C1+PF)/2;C1)
 
other way
 
if(AND( OR(C1==P1;C1==P2); abs(P1-P2)>0);(C1+PF)/2;C1)
 
In reply to alberto ro

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Alberto,

This question arose from a request for help from a professor.

After further discussion with him, I verified that the criteria are actually as follows:

1) If the student misses P1 or P2, the PF (Final Exam) replaces it.

2) If the student takes P1 and P2 but misses the PF, the P2Ch (Secondary Exam) replaces it.

P1, P2, PF, and P2Ch are the assessments taken by the students.

Final Grade = ((P1 + P2) / 2 + PF) / 2

Ricardo
In reply to Ricardo Caiado

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Hi, Alberto

Thanks a lot for your help.

What formula would meet the above requirements?

Ricardo
In reply to Ricardo Caiado

Help with "Calculated Grade"

by alberto ro -

if I understood well your aim.

considering "missing" was equal to "zero'

2  categories A1 and A2 both (aggregation natural or sum)

inside A1: P1 and P2

inside A2: PF and P2ch

A1`s formula: if(sum(P1,P2)==P1, (P1+Pf), if(sum(P1,P2)==P2, (P1+PF), (P1+P2)))

A2's formula: if(sum(PF1,P2ch)==PF1, PF1, if(sum(P1,P2)==P2ch, P2ch, PF))

a new item with formula: (A1/2+A2)/2

if "missing" isn't equal to "zero" you"ll need change ""if" to consider P1==0, P2==0

In reply to alberto ro

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
Alberto,

Thank you so much for your time in helping me.

"0" (zero) means that the student took the exam and got all the questions wrong.

"Missing" means that the student did not take the exam.

Ricardo
In reply to alberto ro

Help with "Calculated Grade"

by Ricardo Caiado -
Picture of Particularly helpful Moodlers
"Missing" means that the student did not take the exam.

In this case, the PF will replace the exam that the student missed (P1 or P2).