|
[
Permalink
| « Hide
]
Gary Anderson added a comment - 29/Nov/07 03:10 PM
Took out unneeded commentary and changed title.
I personally do not like grades over 100% at all, this can break easily and I am sure it will break sooner or later. My +2 for not supporting it.
On the other hand I understand some ppl do want it anyway, the compromise could be to create a new function grade_allowed_value($min, $value, $max) then you would have to patch just one line of code, other benefit is it could properly deal with null == nice code in general. It might be a good idea to consolidate the bounding call, however I carefully looked at what each call to bounded_number for grades, and while the above needed to be patched, there were 4 others dealing with scaled or letter grades that I preserved.
The other place you may want to consolidate code is the aggregation types menu. If one wants to cut down the available choices, one needs to go to several places in the code. Update: With the warning message given by
} else if ($finalgrade > $this->grademax) { to } else if ($finalgrade > $this->grademax *2 ) { Note that the code from I am not recommending this feature for 1.9, but simply as a starting point in case this feature is demanded in the future. We have implemented it at our school, however, and it works fine. this is what we ended up doing for the same problem:
/lib/grade/grade_item.php change change change I am curious if there is still anymore talk about adding the ability to go over max and 100% in core.
If there isn't any more talk about this, there should be. Losing the ability to go over 100% basically cripples the way I typically grade (where "extra credit" means that it is in fact possible for a student to get over 100% on a given assignment, and that factors in to their final average for the course).
This was very easily doable in 1.8 and earlier - create a 100 point assignment and an X point assignment, put them in the same category with the X point one marked as extra credit, and presto - you could get 100+X points in a 100 point category. It seems not-at-all-doable in 1.9 - at least, in any practical way - unless I'm missing some magic incantation in the user interface. It is possible to have separate grade item with extra grade in 1.9. But only in case that category aggregation is set to Sum of grades. So, one can have 2 separate assignments with one defined as extra credit. However, it is somewhat clumsy for a teacher. A better solution would be to be able to grade over a 100% limit - to define both maximum grade and 100% grade independently. This was doable in 1.8 using the option "Curve to". See my post here: http://moodle.org/mod/forum/discuss.php?d=105594
Thanks Miroslav, I like this idea of having separate setting for maximum and 100%, seems this could solve all problems.
Database changes are not allowed in 1.9.x branch, setting 2.0 as target. As long as the maximum can be over 100 (so I could give a score of 110 on a single assignment), that'd be fine by me... otherwise, I have to start scaling everything down so I can make the maximum be (for instance) 50 points with 5 possible extra credit, or 80 points with 8 possible extra credit, instead of 100 points with 10.
What I'm doing for this quarter is that I've made the patches suggested above, and I'm using the "Mean of Grades (with extra credit)" weighting option (even though it's "unsupported"), which does basically exactly what I want with respect to mimicking the old behavior. Hopefully the solution in Moodle 2.0 will be cleaner. I tried the Robert's bonus points script change in 1.9.2 and my course totals are double what they should be. Since I multiplied by 2 I would assume there is a place where I have an extra *2, but where?
In Robert's
/lib/grade/grade_category.php will cause category and course totals to double when scores are manually updated. sending a patch that should allow grades > 100% in a backwards compatible way in latest 1.9.4+
after applying you need to go to http:/yourserver/admin/ because new setting needs to be initialised - I did not want to mess with version numbers yet Petr:
Thanks for posting this patch. From visual inspection, it seems to have some good ideas. Is it possible for either you or Nicholas to apply this to test.moodle.org? If so, I can make sure that it is thoroughly tested by myself, my colleagues, and those at other institutions to make sure that it meets everyone's needs and concerns. --Gary Oh, I never used test.moodle.org before and I do not have any account there, I use my own private testing servers.
Nicolas - could you please review it and install it there? Petr:
I did patch this on one of my development servers, although it would still be nice to have it on test.moodle.org so others can try it and so we can see how you and Nicholas would do it. I was not able to get it to work for me. It kept setting my activities to the maximum grade. I have written up three "use cases" to help you understand how people might use extra credit: http://docs.moodle.org/en/User_talk:Gary_Anderson/Examples_of_Extra_Credit_grading On an affirming note, your way with this patch of letting administrators select only certain types of grading strategies, if expanded, could go a long way to solve some of the usability issues. For example, I would probably start a new site with only "Simple Weighted Mean of Grades – unlimited", which I would call "Average of Points". Then, when someone wanted a weighted gradebook, I would add that. I suspect that many sites would not have teacher requests that go beyond two or three strategies, and if they did, that would be fine. Most teachers would be OK with methods being added if they knew that somebody was actually using it in their institution. Hence, this does not need to be a course based setting and instead one could simply have a set of instructions of how to configure Moodle to be as simple as possible for a given institution by turning off all unrequested features easily. Petr,
Is this going to be the way we do things? I like the idea of administratively hiding aggregation methods and using these new aggregation methods to facilitate grades above maximum/100%. If this is the way this will be implemented in the future, we will start incorporating these changes into our LSU grade book. The patch has been applied to the 1.9 test server, and seems to be working fine. Please test and provide some feedback, it will be greatly appreciated!
I have tested Petr's patch both on our internal testing server and on test.moodle.org. It does not work for me.
I went into the tutorial course that I have created on those sites and on the 100 point test I gave the first student 105, assuming that they got all the required answers right on the test and answered a 5 point optional question correctly. On the patched gradebook, it still converted this score to 100. Using my patched code given with this original bug report, it allowed for the 105 points. Note that had I given even more points, the course or category grades can also go over 100 percent, which is also what I would expect and what would certainly happen if I computed the grade by hand. Using the LSU gradebook, it worked correctly and as I would expect. The point is that by default the grades from activities can not go >100%, so you have to use some extra credit aggregation. There is a special switch for activity grades >100%, unfortunately you can not just switch it in admin UI (it is config.php only), because you need to regrade everything after any change in this setting.
see use of $CFG->unlimitedactivitygrades in the patch
It looks like Nicholas has not set the $CFG->unlimitedactivitygrades on the test server. It would be nice if that could be set, and and example course posted, so that we can offer feedback.
Note also, that the patches that have been contributed, both by me and by Robert (and his LSU gradebook) require no new "aggregation types", and that they have been extensively field tested with hundreds of courses and teachers and thousands of students. It works just fine for the problem identified. I don't mind the use of global $CFG variables for the purpose of site configuration, but why don't you just use it to apply my original patch and have this form of Extra credit be done with? Gary, I set tested the grades over 100% on the test server as soon as I applied the patch, and it worked just fine. I'm not sure what you're doing that doesn't work, so please be more specific.
Here is a link to the test course I am using. You will see that some of the students have more than 100% as grade in categories and course total. http://test.moodle.org/1.9/grade/report/grader/index.php?id=2 I was trying to assign 105 points to a 100 point assignment, which my original patch lets you do, but apparently Petr's does not.
I'll try to figure out what you are doing with extra credit categories in the test course later today and see if it gets at the issue. From a quick look, it seems like you are using an "aggregation method" that already has an extra credit feature. I would suggest that we use a much more simple set of courses for this discussion, three scenerios of which I describe here: http://docs.moodle.org/en/User_talk:Gary_Anderson/Examples_of_Extra_Credit_grading Gary, I've set up a course based on your 3rd use case. I will set up the others shortly. Please join the moodle HQ chat for a more active and productive cooperation.
http://test.moodle.org/1.9/grade/report/grader/index.php?id=9 The second use case is ready:
http://test.moodle.org/1.9/grade/report/grader/index.php?id=10 And the first and last: I agree with Gary that we do not need to introduce yet another aggregation method. Sum of grades should be able to do what Sum of grades Unlimited does. An admin can probably decide whether to allow to "go over" or not.
Or are those 5 new aggregation method just for testing/development purposes? Can this solution be applied to the forum module too? It should occur by default when sum of ratings or count of ratings is selected as the aggregation type.
p.s. I have tested more and got the same result: I cannot override the grade for a student on a assignment, and make it more than the possible Maximum Grade (I cannot type 105 for a student, if the assignment was worth 100).
I also was expecting this to be possible with the new patch, without the need of adding new "extra credit" column just to keep track of those 5 points. Elena, you don't understand. Only the category totals (and course total) can go over 100%. That's it. If you want your student to have extra points, you must create a grade item that is set up as extra credit, within a category that has "Mean of grades with extra credit" or "Sum of Grades" as aggregation.
This solves ALL your problems. Please see the examples I have posted above, they are simple, clear, and they work. I understand how it works. But I think that it would be better to allow the grade item to exceed 100% (as far as I can tell that what Gary says as well, plus LSU gradebook allows for such). Creating a separate grade item for an extra category solves the issue indeed, but it is less user friendly and requires an extra step.
Hmm, I did make a compromise patch allowing grades over 100% (with some limitations), please stop complaining that it is not on by default - as far as I know only people from US and Canada require this - the rest of the world is much bigger
Allowing grades >100% from individual activities can not and will not be allowed by default. For technical reasons there can not be a simple switch in admin settings because all grades need to be recalculated after the switch. It is relatively simple, you can either like this patch and help me push it into 1.9.5 or you can keep claiming that grades >100% are the only correct way (which annoys me and several other developers) and in that case it will not be implemented in official 1.9.x branch at all, sorry. I did not intend to be harsh, let me explain it once more in more detail
To Gary: To Elena: To anybody else: Petr oh, I forgot to mention that the upgrade path from custom tweaks to this should be pretty painless, you can use SQL and add 100 to each stored aggregation type in each grade item and all existing category items will allow >100%, you also need to reset the needsupdate flag in order to trigger regrading
Grades will be recalculated = influenced only if the admin switches back from "allow grade items to over 100%" to not. I run under assumption that admin would be smart enough to know the consequences. O_o
I suppose you did not realise that such regrading may take several hours and we do not have any confirmation option when changing site settings, right?
If you do "allow" as an admin just once, then no recalculation is necessary. Everything should stay the same. No?
Recalculation is only needed when you go "back", which one for sure should not do. Many not-that-smart admins expect moodle will prevent them from shooting themselves into feet or each other
well, we do not have anything like that - one way switch, we always use config.php for these advanced things.
and no, you need to recalculate when both enabling and disabling activity grades >100%, because there might be already some aggregations that allow grades >100%
Petr,
I've had a chance to spend some time trying your patch some and am very excited to see extra credit assignments "working" as expected in the "Sum of Grades (unlimited)" aggregation method! Thank you! And thank you Nicolas for setting it up to try on test.moodle.org. In exploring the new options, I haven't been able to get an extra credit assignment to work in the "simple weighted mean (unlimited) aggregation, though. Is that not possible with the patch or do I need to spend some more time experimenting with the settings? Ideally, I'd like to be able to use extra credit assignments with the "aggregate only non-empty grades" option, but the "Sum of Grades" method does not allow that. I don't understand exactly what the problems are if we completely remove the bounds checking on just
Petr, can you explain exactly what the problems really are? I didn't really get it from the discussion so far. Gary, you have given us no feedback regarding the 3 courses I spent time setting up on the test server. I followed the guidelines you outlined in the moodle wiki, and it seems to me that the desired outcome is achieved. Could you please take a look and give some more specific feedback?
Nicholas:
I have looked at the three courses you put on earlier today and discussed thoughts on the jabber network with Martin and Tim (you and Petr were not on at the time). Keeping in mind that my original patch and the feature in the LSU gradebook works with all aggregation types, does not require creating an separate assignment if extra credit is part of an single activity, requires no special training for teachers on gradebook configuration, and does not require new aggregation types, I think that we should stick with my original approach. The only thing I would change in my existing code is to have the constant of 2 be set with a global $CFG variable. With a value of 1, everything works the same as it does now. I frankly don't like the idea of the code moving things to the boundaries when out of range as it masks data entry errors (which in practice are easy to spot if you do no boundary checking), but I guess we can live with that. Petr has just fixed a couple of bugs in his patch which prevented it from working correctly. You can now access the test 1.9 site and play with grades.
1. Grades can be set to any number up to $CFG->gradeoverhundredpercentmax Thanks everyone for your comments, and Gary, thanks for discussing your thoughts in our jabber developer chat.
Bearing everyone's comments in mind, in a chat with Nicolas, Petr and Martin, the following solution was proposed:
( See also http://docs.moodle.org/en/Development:Gradebook_improvements_in_Moodle_1.9.5
As always, feedback on our proposed solution would be appreciated. OK, reading the previous message, I'm not sure I understand exactly what is going to be doable and not doable in 1.9.5, so here's a question: can category totals and course totals go over 100% in the currently-proposed changes to 1.9.5, assuming "allow grades over 100% across the whole site" is turned on?
To put it another way, consider 2 cases, assuming for both that "allow grades over 100% across the whole site" is turned on: 1. I have a category that is a "mean of grades (with extra credits)" aggregation. I have 2 items in there, both of which are worth 10 points, and one of which is extra credit (with an extra credit value of 1.0). I award a student 10 points on one item and 1 point on the other. 2. I have a category that is a "mean of grades" aggregation. I have 2 items in there, worth 10 points each. I award a student 12 points on one item and 10 points on the other. In both these cases, the category grade should be 110%. Is that what would happen with the new changes, or would the grades be different in these two cases? Is the second case even possible with these changes? (would it still be possible to award 120% in the second case if the assignments were worth 100 points instead of 10, requiring 120 points to be awarded? will the pop-up menu allow me to award 120 points? 200 points?) Thanks for any clarification! So that I can give feedback on this solution, it would be helpful to see a diff file that addresses just this issue by itself, and not one that tries to solve the whole extra credit issue. I will apply this to a test server and see the consequences.
Looking back at my notes, when I made this patch, I simply looked at all cases where bounded_number was found. Of the 11 cases, these 7 were the ones that needed to be adjusted. I used '2' as the factor because I reasoned that in practice, optional work was typically only a fraction of required work, and I could not see anyone wanting to more than double the number of points on an activity in most cases. In practice, placing no limit would also have been OK as teachers are always looking a their gradebook for anomalies, especially before assigning grades. In fact, moving excessive grades to a boundary only masks data-input errors. So, what I want to better understand by looking at the fix is: 1. If all 7 of the above patches are not needed, which ones are? As I told Martin D., if this is implemented, I will write a tutorial on how it works which can be the common starting point for people wanting to do extra credit (like my tutorial on weighted grades). Note that this patch does not solve all extra credit problem. For example, before 1.9, individual activities could be identified as "extra credit"; this still does not address that issue. But it is a step to allow for one accepted way of accounting of optional points withing an activity, and at least one way for whole categories, to be factored into a course grade in practice. --Gary Gary, to answer your questions
1. the only patch needed is Petr's patch currently attached to this issue. You say that Petr's patch doesn't allow for items to be identified as extra credit. That needs qualifying. I have set up several items (assignments, quizzes) as extra credit on the test server and it works just fine. Please explain. I have read through Petr's patch several times and am fairly convinced that all the added aggregation types do nothing to make this code work. If a site wants to allow grades to exceed 100%, they simply change the setting limiting grades to 100%. Since it increases complexity of settings so much, I think these new aggregation types should be removed.
I do like the idea of being able to reduce the number of aggregation types that a site uses as that reduces complexity for teachers (I hope it is documented in a way that suggests that types can be enabled as teachers request them). I just think the feature should be treated separately so that this patch can be evaluated on its own. I am not convinced that recalculations are needed to turn this patch on. I am concerned about the consequences of turning it off if you recalculate grades. A site administrator, in the process of playing with this setting, might be destroying all the over 100% data for every course at once – or maybe it is just how the grade is displayed. My original patch does not recalculate grades; doing so should involve careful testing, IMO. This will take me a few days to test. Gary, thanks for your comments.
We'll only be adding 'unlimited' aggregation types to Moodle 2.0 if a reasonable number of people want them. Regarding documenting reducing the number of aggregation types, I've added the following text to http://docs.moodle.org/en/Development:Gradebook_improvements_in_Moodle_1.9.5: A new aggregation types setting in Administration > Grades > Grade category settings enables administrators to reduce the number of aggregation types. By default, all existing aggregation types are available (Mean of grades, Weighted mean of grades, Simple weighted mean of grades, Mean of grades (with extra credits), Median of grades, Lowest grade, Highest grade, Mode of grades, Sum of grades). This list may be reduced to only a few types, with additional types being enabled as/when teachers request them. Please feel free to edit the page to make things clearer. Daniel, thanks for your feedback.
Yes, category totals can go over 100% if unlimited grade values is enabled. I've just tried your two cases on our 1.9 test site http://test.moodle.org/1.9/ Enabling unlimited grade values removes the maximum grade check when teachers add grades directly in the gradebook. When teachers add grades from within assignments, they can only select the maximum grade or less. Attached is an update I am now testing of my original patch to use $CFG->grade_over100factor as a way for a site to allow grades be entered that lead to values greater than 100%. For example, putting the line $CFG->grade_over100factor = 2; into config.php would let grades up to twice the max value be entered. These values are hilighted in the gradebook and there is a message on input to alert the user.
Instructions for this variable setting can be part of the extra-credit tutorial in the docs. Given the resistance of Petr and Nicholas to allowing any extra credit that might lead to values exceeding 100%, it seems like a $CFG variable would be a good way to go. Since grades are not recomputed, removing the variable or setting it to 1 does not alter entered data which I would be really concerned about with Petr's last patch. And these settings have been working fine for us for over a year and the LSU gradebook does a similar thing so at this point I am I have pretty good confidence it is a good solution, but I am open to seeing examples of where this presents a problem. You need to recalculate the results when switching to grades > 100% because the purpose of the switch is to get different results which are > 100%. If you do not recalculate, the grades may not be accurate unless you do some other setting change.
I read on that page you are worried about people switching grades > 100% off temporarily and loosing info, that would happen only for manually overridden grades with > 100%. There are many other ways to loose grades like changing scales, editing grade items, etc. General solution for this type of problems is to specify these values in config.php, maybe we could just add this basic info into setting help SLOW QUERY PROBLEM:
This query filled our slow query log in mysql. Showing rows 0 - 0 (1 total, Query took 5.0248 sec) SELECT DISTINCT go.userid Five seconds for one user id item is way too expensive! If we can optimize this query then I think we would see lots of improvement. The above query has an unnecessary table join to grade_items gi. I run and equivilent query removing the unnecessary grade_items join and replaced the gi.id <> 1799 with go.itemid <> 1799. The equivilent query is consistently 0.34 second instead of 5 sectonds. If we can replace this in the code as a patch I think will help. SELECT DISTINCT go.userid The query is from lib/grade/grade_item.php 1615 // precreate grades - we need them to exist new query should offer a slight improvement over the existing one. 1615 // precreate grades - we need them to exist Gradebook patch applied, resolving this issue.
Thanks Nicolas, this improvement is now documented: http://docs.moodle.org/en/General_grade_settings
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||