lsuits / projected-final-grade

Dynamic gradebook recalculation to determine final grade
2 stars 1 forks source link

Projected final is broken in beta #3

Closed rrusso closed 12 years ago

rrusso commented 12 years ago

Use http://beta.moodle.lsu.edu/course/view.php?id=40 to test.

Click grades > projected final.

Click any student and fill in data.

For bonus points, do the above in Firefox!

philcali commented 12 years ago

Here's the problem code: https://github.com/lsuits/projected-final-grade/blob/master/rpc.php#L388

Instead of using the mocked category item, pull the grade item from the db like: grade_item::fetch(array('itemtype' => 'category', ...));

Replace the second params with the result of that invocation.

rrusso commented 12 years ago

Are we going with this or Adam's?

I need to push soon.

adamzap commented 12 years ago

Robert, please test. The fix is on master.

rrusso commented 12 years ago

Still getting notices:

Notice: Undefined index: 2 in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Undefined index: in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Trying to get property of non-object in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Undefined index: 2 in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Undefined index: in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Trying to get property of non-object in /var/www/rrusso/22/grade/report/projected/rpc.php on line 370 Notice: Undefined index: 2 in /var/www/rrusso/22/grade/report/projected/rpc.php on line 374 Notice: Undefined index: in /var/www/rrusso/22/grade/report/projected/rpc.php on line 374 Notice: Trying to get property of non-object in /var/www/rrusso/22/grade/report/projected/rpc.php on line 374 Notice: Undefined index: 2 in /var/www/rrusso/22/grade/report/projected/rpc.php on line 375 Notice: Undefined index: in

adamzap commented 12 years ago

Could you send me the course you are testing with?

rrusso commented 12 years ago

It was just a generic blank course that I created a gradebook with the builder.

rrusso commented 12 years ago

This can take a backseat to the restore issue.

adamzap commented 12 years ago

A new fix is on master, so this is ready for testing again.

rrusso commented 12 years ago

Does not work (nothing happens when grades are typed int) in the following configuration:

COURSE -> sum of grades -> 1000 pts

adamzap commented 12 years ago

Could you send me this course to debug with?

rrusso commented 12 years ago

No.

It takes WAY less time to build with the GB builder than to restore it.

That's how I created it anyway. Nothing special.

adamzap commented 12 years ago

Ok, that problem should be fixed.

I think these are all unrelated issues...

On that course, a perfect score of 1,000 is formatted as 1.00 for some reason. It may be due to an internal hard-coded limit in Moodle core, but we'll look into it. That enough of an edge case to ignore for now.

rrusso commented 12 years ago

Same course as above, must make shows 0 to make an A when an A is not a possible grade.

Enter the following values to reproduce: COURSE (SUM) aggregate only non-empty)

adamzap commented 12 years ago

I found a few more underlying problems due to changes in the grade system. I think I'm close to fixing this, but I may find more.

Projected Final Grade really needs to be rewritten from scratch.

rrusso commented 12 years ago

We can add that to our list of ever growing things to do.

adamzap commented 12 years ago

A new fix is on master...this should be the one.

rrusso commented 12 years ago

Issues still occurring:

  1. When using drop lowest in SUM category total in PFG is less than category total in gradebook
  2. Some SUM category totals do not update
  3. SUM category totals show ?? after erros have been cleared

How to replicate:

  1. Create SUM category -> add more than two grades (100, 80, 70...cat total is 250) -> drop lowest 1 (cat total drops to 180) -> check PFG (cat total goes up to 100 MAX)
  2. Come see me to replicate, very weird.
  3. Come see me to replicate, very weird. Related to the above.
adamzap commented 12 years ago

1 Should be fixed. Let me know if 2 and 3 are still happening.

rrusso commented 12 years ago

2 and 3 are still broken.

adamzap commented 12 years ago

I think it's finally fixed.

rrusso commented 12 years ago

Yes it is!