|
Like many people I've also struggled with this issue, and thanks to an overlap between this problem and a larger project I'm working on, I've been given the go ahead from my employer to make a patch to solve it.
Before I get underway I've started a new forum thread to elicit comments and suggestions from the community, as I'm really hoping this is a patch that will ultimately be accepted back into the core. http://moodle.org/mod/forum/discuss.php?d=140907 I'll be putting up some design documentation up on the wiki soonish, depending on the sort of responses I get. Thanks, This has been dealt with in MDL-17484 and a patch is available for 1.97 at that location.
What you appear to have done is solved the request discussed in ticket MDL-18881, which asked for a direct mapping between the `grade_letters` and `scale` tables. This is fine when you are only using one scale in your course and that scale is the same as the letter grades you are using in that context; however this breaks down when you are using outcomes.
Imagine a bunch of outcomes all attached to the same course, but with different scales. In this scenario doing a simple string comparison between the name of the scale item and the name of the letter grade is not going to work. What my fix has done is respond to Jason Alley's proposed issue. Your need is entirely different from what the original issue identified here addresses. Perhaps you should take it separate.
Hey Bob, I'm not sure if "entirely different" is a fair characterisation. Undoubtedly we're looking at this with different expectations. Whilst your patch is useful for people only using the one scale in a course, it's not useful for people who want to use multiple scales in one course. It's also not useful for people who want decimal precision in the value of their scales (see ticket MDL-20367).
The objective of this issue is to "reverse-engineer" the letter grades so that any course could set up any letter (or other, course-wide) scale, be able to input the scale identifier and have it convert to the desired percentage of whatever points are available for the specific grade item. I believe the large vote count on this issue is related specifically to that. That has been accomplished. What you're asking for is a complex rewrite of how scales, outcomes and the grader report interact. I believe that should remain separate.
Actually, my original request was for non-numeric values, not specifically letter grades. Bob's fix does the trick if the non-numeric grade is a letter grade, but it does not affect other non-numeric inputs created in custom scales (e.g., checks, check-misuses). I was hoping to see something available in custom scales as well.
Hey Bob, you're probably right in assuming that in the majority of cases people would be happy with simply matching scales to grade letters. I am in no way implying that your patch is without use.
However, Jason's request was to:
This is exactly what I want, but I want it to work independently of letter grades and I want it to work in all areas of Moodle, regardless of how many scales I might be using. You're also right in stating that what I am proposing is a somewhat complex rewrite of how scales are implemented (the actual changes shouldn't affect outcomes at all, and would only affect the Gradebook insofar as it makes direct access to the `scale` table rather than using an API). I'm also proposing to make these changes myself. I think it is poor database design to have scales stored in a comma separated list, and the issue discussed here is simply one manifestation of this initial design constraint (see ticket MDL-13372 for another example). My sole intent in posting to this tracker was to elicit feedback from the broader community on what would be the best possible solution, as I'd like scales to be properly fixed. I am with you on that. I see the same database design in the Feedback module and have fought this de-normalization wherever possible. I'd like to see the reverse engineering of grade letters considered complete and included wherever appropriate in the release schedule (its really a small hack). I also appreciate you're willingness to undertake this larger endeavor and bid you good fortune.
Thanks for the encouragement Bob. Can I suggest you post a link to your patch on ticket MDL-18881, as this is a very close match for what you've done.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
thanks