OS4ED / openSIS-Classic

openSIS is a commercial grade, secure, scalable & intuitive Student Information System, School Management Software from OS4ED. Has all functionalities to run single or multiple institutions in one installation. Web based, php code, MySQL database.
https://www.os4ed.com
213 stars 205 forks source link

V9 Assignments weight verification giving erroneous result #279

Open rogergrant99 opened 1 year ago

rogergrant99 commented 1 year ago

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
fcortesjp commented 10 months ago

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 commented 10 months ago

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 commented 8 months ago

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

Thanks!

rogergrant99 commented 4 months ago

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