Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V9 Assignments weight verification giving erroneous result #279

Open
rogergrant99 opened this issue Feb 12, 2023 · 5 comments
Open

V9 Assignments weight verification giving erroneous result #279

rogergrant99 opened this issue Feb 12, 2023 · 5 comments

Comments

@rogergrant99
Copy link

rogergrant99 commented Feb 12, 2023

In V9 It appears that line 1296 and 1301 in modules/grades/InputFinalGrades.php gives erroneous result, after changing line 1296 from:
if ($at_val['FINAL_GRADE_PERCENT'] != '' && number_format($at_val['FINAL_GRADE_PERCENT']) != 0)
to:
if ($at_val['FINAL_GRADE_PERCENT'] != '' && number_format($at_val['FINAL_GRADE_PERCENT'],2) != 0)
and line 1301 from:
if ($total_assignment_type_weightage == 0)
to:
if ($total_assignment_type_weightage != 1)
After the changes the results are appropriate for an un-weighed or incompletely weighed assignments.
Capture d’écran, le 2023-02-12 à 15 32 20

@rogergrant99 rogergrant99 changed the title Assignments weight verification giving erroneous result V9 Assignments weight verification giving erroneous result Feb 12, 2023
@fcortesjp
Copy link

I'm sorry if I'm posting this where it shouldn't but I also seeing the wrong Full Year calculation on 7.4 in 2 course periods configured in the same way and in which the only the assignments of the last term were getting a weight percent
in one course period the calculation of full year is done right.. but on the other you get Full year with % over/larger than 100%
in both cases S1 and S2 (that make up the FY) calculation are configured as 50
is this something already fixed on version 9.0?
any ideas of why you would get different calculations with both course periods and assignements configured exactly the same?

@rogergrant99
Copy link
Author

Not sure I can help as I dont run V 7.4. All I was pointing to here is that the feature in V9 that checks and warns the user if the weight distribution comes to 100% before assigning the final grades. V9 has a bug where it was not giving a proper warning. But it does do weight calculations correctly.

@sayan-os4ed
Copy link
Contributor

Please use the updated code from the repo and check to see if you are still getting this error or not.

Thanks!

@rogergrant99
Copy link
Author

Still seeing that error. The code is identical as what I saw in version 9.0

@fcortesjp
Copy link

fcortesjp commented Nov 18, 2024

having the same issue when calculating S2 in one ouf our classes

I'm on version 9.1

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants