virtUOS/mooc.ip — pull request #239 by xabbuh (2014-08-18 13:14:15+00:00)
Title: weight blocks depending on the value of max_grade

Before, each block was weighted equally. This led to some weird
behaviour.

For example, imagine a section with an HTML block and a test block.
Once the user has viewed the HTML block, it is graded completely.
Further, imagine that the test block consists of four exercises of
which the user already solved two. Thus, it is graded with two points
out of four points.

With the old calculation, the complete section would have had a
progress of 75% (`(1/1 + 2/4) / 2 = (1 + 0.5) / 2 = 1.5 / 2 = 0.75`).
Now, the same configuration leads to a calculated progress of 60%
(`(1 + 2) / (1 + 4) = 3 / 5 = 0.6`).