I recently installed moodle and then switched to the 1.5 branch.I have been looking for software to do online grades and posting of content for courses at the high school I work/maintain the website for. Moodle is thus far the nicest and most complete php solution out there. The one this that is missing from it is the ability to enter multiple grades for an assignment. The older version had this, even though I wish it were a text box and not a drop down menu, but still now I have to click on grade for each student for each assignment then click for the dropdown. This is extra steps for reasons I fail to see.
Is there a way around this to get newer features like categories and/or weighting but still at least keep the old way where you could alter all students grades for a single assignment at once?
Thanks,
mrjohnston
We're currently working on an implementation of what you speak of. Its quite complex -- Moodle has grades that are derived from "fixed" (calculated by the program) and "input" (assignments where the instructor marks each grade manually). Our intention in development was to make the manual entry of assignments' grades much quicker than now. I'm certainly willing to share with you where we are at. We've actually made quite a bit of progress and things are looking hopeful now that Michael Penney's gradebook_cdc is part of core. Here's a screenshot:
Let me know if looks interesting enough to you to persue.
Bob Puffer
Luther College



That is a big request here, also. It would also be cool to have a link for grading from quizzes and lessons essay questions from ungraded items, though then you might have multiple essay questions do it would probably be best to pop-up the quiz/lesson grading interface for that.
Anyway, let us know when you get this done, Jeff might be able to work on it later in the summer if you need testing/integration work and it looks like something that would be a great inclusion into 1.6 if Martin oks it.
That looks like exactly what I had hoped for, amazing work thus far. Makes it so you can see and get to so much more. I seldom need the comments and the ability to do the entering without dramatically change the page layout and making the person spend lots of time navigating is amazing. If you need help with anything let me know. I can see if I can do anything but I am not a great coder. If nothing else I can just test it out as much as possible and maybe write up any documentation you want. I'd be glad to help however I could cause this would be perfect for my high school.
Hope to hear back from you and feel free to send any code/requests to my email.
mrjohnston
mrj@mrjohnston.org
Can't wait to use the new gradebook.
For now, I have 100+ offline assignment daily from different class that needed to grade. What will be the most effective way to do the job? What I am doing now is assign each assignment a different catagory and fill in the grade one by one for each student. It takes about 2 hours just to input the grade.
- Totals refresh dynamically
- Select-all feature
- Moodle-graded items link to the grade item in a new window
- Select and de-select columns and rows. (NOTE: Selecting a column and selecting an intersecting row de-selects the point at which they intersect).
- NOTHING is saved until the 'Save Assignment Grades' button is
clicked.
- Displaying hidden grade items for marking even if "Show Hidden Items" is set to 'No'. This would include how to handle the total because total doesn't include hidden items when hidden is 'No'. This code is pretty deep so not sure what we'll do or if we'll do it. Instructors may have to work around it.
- Display of the letter grade allowing it to move based on the edited grade
value. This also encounters the problem of Hidden.
we're working on it but would like to get some initial feedback. File contains index.php and lib.php for current GA version of 1.5 to be placed in ./grade. Needless to say, I always make a copy of my old ones.
PLEASE NOTE: This is all accomplished in java script so if you have some issues with that, this isn't going to be your solution. We chose that for the functionality and because we have control over our browser environments (pretty much)
p.s. This gradebook extension is another example of the excellent programming work we've gotten from The Linuxbox.
Thanks for sharing the code
A few things I would like to note. The existing code chokes horribly if you have assignments with a lot of points such as 100. In my test course with 14 students and trying to edit a category with 3 assignments worth 100 points each it times out. I increased my php timeout to 2 minutes from 30 seconds, but it still times out. I changed the code for the assignment handler (starts on line 1906) to use an input box instead of a select dropdown as expected this is the culprit. Making this change allowed the page to load and IMO is a much better interface for editing a lot of grades at once. The replacing code is
$edit_link = '<input type="text" XonChange="retotal('.$student.')" assignment['.$student.']['.$link_id->id.']" value="'.$items[$assignment]['grade'].'" size="5" align="right">';
and should replace all the code inside the assignment switch. note: the forum mod places an X infront of onChange so remove that in the above line if you want to use this instead
Also the "reset grades" button doesn't properly calculate the total grade when there are non-numeric grades ie. '-' or 'Excluded'. If a grade of '-' is seen this is ungraded and should count as 0 points. If 'Excluded' shows up that should count as 0 points as well, but the total points from that assignment should be subtracted from that particular users total to grade against this will change the outcome of the percent calculation. This is probably not too important as your existing code does not calculate the percentages dynamically.
Concerning hidden grade items you can get the total for hidden grade items from the variable $all_categories which is set after calling grade get formatted grades. This var is structured to have all the categories with all the mods per category under these and then all sorts of information for the module instance under that.
For you grade items links you may want to consider taking the user directly to the grading feature for the module. For instance with forum you could send them to report.php rather than view.php and they will be editing the grades for forum posts.
hope that helps.
Also on the topic of excluded grades, having a word or symbol be used to exclude a grade from a students average would be the last feature I was going to ask for aside from the fields instead of dropdowns you already seemed to have solved. Saves a lot of time for me in the inner city where it is common to have to excuse stuff to be able to just do it from the regular grade sheet while entering other students grades. Plus it'll be easier for me to show other teachers, as I think the majority of my high school will be using my moodle installation to get their class content and the grades online for students.
Thank you so much for your work. I truly to appreciate it more than you know. If you guys need anything like I said please just ask. I am not a good coder and it doesn't help moodle is quite large and complex but I will test, write docs, or try to make demo's etc. if anyone would find it useful. Just let me know.
mrjohnston
The code I wrote doesn't seem to recalculate the grade appropriately (some javascript problem), but it does fix the problem with the dropdowns. The changed lib.php is attached.
I don't quite follow what you mean in your 2nd paragraph concerning excluded grade items. The gradebook currently allows you to exclude a student from grading for an item. If you don't like "Excluded" showing up in the gradebook you can change that by editing the lang file "lang/en/grades.php" and changing the following line:
$string['excluded'] = 'Excluded';
to:
$string['excluded'] = 'Whatever you want';
Concerning excluding students from the "grading sheet" you will have to ask Bob if he is interested in extending his code.
I see what you mean now. With the dropdown menus I couldn't just enter Excluded so I always did it with the grade exemptions tab which I hated. Now that I am using your text(?) boxes to enter everything I see how I can just enter Excluded instead of usig the other screen which is exactly what I wanted. 2 birds 1 stone.
Thanks,
Adam
I haven't checked it, but I don't think that will actually exclude the students from grading. Just temporarily in the edit grades portion. If you leave and come back to the gradebook the students will probably be re-included for the assignment.
regards,
Jeff
First off, thanks for the input. The more testers, the quicker we can find problems like the timeout. Trying to keep with the scheme Moodle had for editing assignments, I used drop boxes. Unfortunately, as you show, having lots of drop-boxes being dynamically created can get quite hectic...
The code as-is, shouldn't time out, but it obviously is not the best way to go about it. I like the idea of the input box, however, bounds checking needs to be considered. And since that is most-easily done in Javascript, and we just so happen to already have some, why not throw a bounds check in there?
Since this project is being done for Bob Puffer, I'll talk to him about switching to the input boxes, I don't think it would be that big of a problem, and then most likely release a new version with the input boxes, and the bounds checking both included.
We are still working on a few other things, one of them is the addition of letter grades being dynamically reloaded when a grade is changed. This is slightly more difficult because the grade %'s are not universal and need to be passed from PHP to the javascript.
Jeff, could you explain the retotaling (off of "Reset") problem again? In my copy it seems like it is working (it ensures the things it is looking at are numbers before adding them to the total (thereby avoiding anything like the '-' or 'Excluded')...
- Dan Sherman
- The Linux Box
Concerning bounds checking. It is nice to do that client-side with the javascript, but regardless you will also have to check server side.
Grade letters: you could create a javascript function (through php) with a few if statements that receives one input and returns a letter it would keep track of the percent range and what letter should be used. The problem being is that if the grading scheme is set to "use weighted" rather than "use percent" you will have to calculate fractional percents based off the weighted percent for the category. Furthermore the gradebook as it exists only calculates a letter grade overall, and your code only edits grades at the category level so it seems almost irrelevant unless a user has only one category for their course.
About the retotalling I have attached two screenshots that show what happens when I load a category, press "Select All" and then "Reset Grades". It resets some of the users grades appropriately, but demo10, demo11 and demo12 all get changed to 0. demo,demo gets changed from 376 to 93. This may be a cross-browser/platform issue I'm using Mac OS 10.3.9 with Firefox 1.0.1, but it is odd how it selectively uses assignments especially in the case of demo,demo.
regards,
Jeff
It has to do with switching the inputs from Drop-Box to text.
With Drop-boxes, we were adding all of their values (which were garunteed to be all digits (numbers)), with text boxes, the input is not garunteed to be digits. I was only checking the non-input items (items like Workshops, Quizzes, etc).
I talked with Bob Puffer, he said to go ahead with the Text inputs instead of the drop-boxes. So I'll switch that, add the checks (both javascript and serverside) and get a new working version to him.
I don't think we'll be allowing inputting "Excluded" or "-". Excluding can be done through the current interface. If an item is "Excluded" I'll change it to not include a text-input for it.
I'll leave it to Mr. Puffer to release the copy on here.
Regardless, I will test it as thoroughly as possible as soon as Mr. Puffer releases it (hopefully he will, and I thank him for releasing the work).
Chomping at the bit in the meantime
Oh, and on one last note is this new gradebook at all related to the 1.5 gradebook? I was looking at some of the csv import addons and wondering if they might work on this once they are ported to the 1.5 codebase or perhaps only need minor modifications I or others could blunder through easily enough.
Thanks again to to Bob and the coders
mrjohnston
This addition of the "Edit" button is directly added to the 1.5 gradebook. An extra function for saving the submitted (changed) grades was added, a block of javascript, and a bunch of lines of code to deal with giving editable cells were all added.
I can't forsee the "Edit" addition giving too much trouble to other gradebook modifications. In most cases, any changes I needed to make to the gradebook code is wrapped in an:
if ($_GET['action'] == 'edit') {
... Edit Code Here ...
} else {
... Original Code Here ...
}
While in a few places I added HTML "names" and "IDs" for the original sections, they should for the most part be the same, and easy enough to find for other modifications.
One proviso, doesn't work with IE. Looking into it but that wasn't an important consideration for me.
Thanks for waiting,
Bob Puffer
It doesn't like scales (just doesn't update the scores when I chose a scale, but interesting enough when I change it from a scale to points the scores I entered while it was listed as a scale appear) but thats minor. IF they are needed you can use the old grade entering method.
On a sidenote: Now I just have to try and figure out why they changed to the new "grade" box I have to hit for evey student and see if I can change it back to the original cdc way where all the dropdown boxes were there for each student. That and I will see if I can work with the other guy interested to allow assignments that are over 100 points, especially now that I don't have to use dropdown boxes to enter the grades
Also whenever you update first you have to click through the screen where it says javascript true and you have to click ok then another where you say yes you want to update or cancel. Could that be gotten rid of so you can just click update and it updates and if you screwed up just hit reset? I personally hate extra clicks as they waste time and move my cursor location messing with my flow as I work, don't know how others feel on this one.
When the person clicks on grade from the menu could it open to edit grades? These little things save a lot of time in the long run.
I think thats all I got from the first run through i gave it. All in all pretty darn nice, just a few smaller issues, many of which I know aren't showstoppers like the clicks when I save and having it open to the edit screen.
Nice work thus far and thanks again for sharing.
Adam Johnston
As for allowing just "Excluded" and "-": a hyphen is essentially treated as a 0 in the gradebook. Therefore, instead of entering a -, just enter a 0. As for the "Excluded", because Excluding grades goes through an already implemented system (that we didn't want to interfere with), we leave alone anything that is already Excluded (by not allowing it to be changed), but at the same time, don't allow for you to enter "Excluded". If you needed to exclude someone from grading of that item, it can just as easily be done through the already implemented system, and this way we don't mess with touching parts of the database that another system uses (any more than we have to).
As for the Javscript popups:
I assume you are at first talking about your browser warning you that it will be running javascript. I can't do anything about this, the system uses javascript for anything that happens without refreshing the page (changing rows/columns to edit/non-edit modes, dynamic-retotaling, etc), so unless we implemented this system in pure PHP (no javascript), your browser will warn you (there might be a setting to turn that off somewhere in your browser).
As for the popups saying "Are you sure?" before submitting grades, this is where we do basic error-checking (to make sure you've only entered numbers) we could take out the "Are You Sure?" and still keep the error checking, but it was put in as a safety precaution (to prevent mis-clicks). As a workaround for you:
--- In grade/lib.php, search for ---
if (confirm(\"Are you sure you want to submit the changes?\")) {
document.forms.edit_form.submit();
}
--- Which should be around line 1757, and replace with ---
document.forms.edit_form.submit();
That will get rid of the popup for you.
As for opening directly to the Edit page, it is possible, but brings up unneccessary problems. This might be done later in the life of this project, but not yet (at some point, the editable part might possibly be merged with the original gradebook section, who knows).
Thanks for your help in testing =P
I just wanted to point out a few things for clarification.
While the gradebook treats '-' as a 0 for calculation purposes it really means that the student has not yet received a grade for that item. This is rather important to distinguish as it flags to the instructor that no grade has been received. Just replacing it with 0 has a different connotation; the student turned it in, and received no points. If you wanted to you could delete the grade record from the appropriate table if the user input '-'. This could be useful if the instructor mistakenly gave a student a grade or some similar situation the gradebook would then display '-' for the students grade.
Concerning excluded, I see your point concerning not wanting to duplicate interfaces/efforts which makes much sense. However, from a user's perspective it doesn't quite follow logically that they can edit all of the grades except for a few, and after all doesn't the "edit grades" duplicate the grading methods elsewhere, albeit much more nicely
Just my thoughts.
Basically I found that opera and IE don't like the code for whatever reason, when you click they just don't make the text boxes. Forefox and Konqueror do though. So I would assume safari would work as well (no way to test that one) in case that matters to anyone.
Is there any way, on a separate line of thought here, to have the total percentage or percentage per category listed but not the percentage for each assignment or does it have to be all of nothing? I know this isn't any issue with the script, just a question about the grade module as a whole
Adam Johnston
I see the problem, and I'm looking at the code, as this is going to be released to the community, it will hopefully be working for IE/Opera/ (all browsers) in the near future.
The browser issue won't bother me too much either. I am giving out theopencd project's cd to all the students or teachers who want it so its not a big issue. I just figured I would test it out more just so people know what will work. If you do fix it though I won't complain
Also I screwed up before. It does seem to work fine with excluded assignments. Don't know what I did before to get it to get irritated at me. It doesn't like "-" that are left though, as in when you edit half the students for an assignment and try to save it gets irritated at the - symbol entered for the others by default. Perhaps this can be fixed easily by trying to find where the code is that enters the "-" by default and remove it. I can always try and find that, more a minor issue as I said.
Is there an easy way to remove those popups though when I save the grades? I assume the code is in lib.php so I can try and adjust it myself I just want to make sure roughly where it is and make sure it won't mess up anything if I try to remove them. I am not a coder but I can always browse and try and fix it. I have lots of time in June free.
I'll browse through tonight and see if I can adjust any of the things I mentioned and post what I did if I can in case anyone is interested.
Adam Johnston
if (confirm(\"Are you sure you want to submit the changes?\")) {
document.forms.edit_form.submit();
}
--- Which should be around line 1757, and replace with ---
document.forms.edit_form.submit();
That will get rid of the popup for you.
As for the "-" not working by default, I'll change that pretty soon here (trying to fix the IE/Opera problem.
Making good progress on integrating with IE/Opera. Mostly working, another copy should be released soon (I'll try to add documentation for the next release).
I was just curious if the mod was nearing completion now and if it is going to be released? I have the latest version installed and it works fine but I didn't know if you had finished modifying any browser issues or the issues with the "-" and if Mr. Puffer would release the new code.
Either way thanks, I am going to use this as an option for teachers who don't need import options as it is very intuitive for those moving from spreadsheets or offline gradebook programs.
Adam
I'm throwing what's put together out here. Fixed since the last post is the ability to work correctly with IE.
I noticed that too how small its getting. Maybe next time you post, post a reply to the original and we can enjoy a little room for awhile?
On a sidenote I am trying to mod the script. Ha, someone else made a mod that pretty much replaces the way assignments can be added. Lets you use text boxes to select the points which means theres no 100 points per assignment limit. Looks like its just modified code from the existing codebase so I am gonna see if I can make those assignments edittable with your script seeing as that'd fix my issue of only 100 point assignments. In the inner city where I am sometimes making everything worth a lot of points is the easily way to make kids take them seriously. No idea if that'd matter/help at the college level but I'll let you know if/when I manage to get it.
Thanks for everything, the script really is great
We modded the old version for this very reason, a number of professors here at Cal State wanted to use >100 assignments. One even wanted to be able to put in negative point values.
function print_grade_menu
in lib/weblib.php
The LinuxBox is proud to present the gradebook enhancement to Moodle:
http://linuxbox.com/tiki/tiki-index.php?page=Moodle+Packages
With the download at our site you will recieve a zipped file (tgz or zip) to decompress in your moodle root folder. It will put itself in the right places, and install itself. In your /yourmoodle/grade/ you will find a README file explaining what the enhancement does, and how to use it.
As per Don Hardaway's question:
The moodle gradebook enhancement doesn't touch the database until you edit someone's grades. This means that just installing the new gradebook won't damage any student data, the only way to screw up data with the gradebook enhancement would be to go through each assignment for each student and enter 0's, and then click submit.
I've been busy recently, but if I get some time, this is definately on the list of things to add (a few people have requested it).
What am I missing? There does not seem to be any way to actually get in and start editing. Have I got the wrong file downloaded or something else that I cannot see? Feeling like I am not seeing something really obvious!
Nikki
To edit grades: Click on the "Edit" tab, and then click a student name (row) or assignment (column) and that row/column should highlight.
If the gradable item is an assignment, the grade should change to a input box, where you will be able to change the grade. If the gradable item is _not_ an assignment (it is a quiz, exercise, etc) it will become a link that takes you to the item.
These items cannot be hand-graded because they are scored automatically by the module. If we allowed you to change them, your change would get overridden later when the module graded itself again.
- Dan
www.childbirthinternational.com/study
I am completely stumped. I used the zip file in the file above (manualgrade.zip) and put it into the Grade mod. I was using 1.5 until last week and it was working just fine - just as you describe. Then about a weerk ago I upgraded to 1.5.2 and it disappeared- no more edit tab. So I installed the manualgrade.zip file and the edit tab appeared again but no editing is possible of assignments - the rows/columns don't highlight, nothing. Any clues? It might be easiest to install Gradebook again - just want to make sure if I do I am installing the latest version and best version to get the editing to work.
Nikki
Username: student
Password: testing
The editing teacher in the same group is:
Username: teacheredit
Password: testing
Url is www.childbirthinternational.com/study
I have switched grades off temporarily in case that was causing a problem.
Nikki
However, if I input just one or two grades, and then click on save assignment grades, it tells me that, for all the students I did not enter, I have a javascript error and the input was not a valid number. So, unless I enter 0 for everyone else that i am not entering a mnaual grade for, I cannot enter the ones I want to change. Any ideas?
Nikki
Now, on save, all hyphens are treated as 0's.
About line 123 it says:
if ($preferences->show_weighted || $preferences->show_points || $preferences->show_points) {
and it should say:
if ($preferences->show_weighted || $preferences->show_points || $preferences->show_percent) {
Otherwise students cannot see the gradebook at all if it is set tpo only show students percent.
Nikki
http://www.linuxbox.com/tiki/tiki-index.php?page=moodle_gradebook
I have downloaded the .tgz file, decompressed it, and copied it into the Moodle root directory. It shows three files, index.php, lib.php and README. Before doing this, I renamed the original Grade folder Grade_old. Is there some other "install" procedure that I'm missing?
I must admit that I'm a complete newbie with Moodle, but I'm trying to test it out this summer with the hope of running it on my high school's server starting in late August.
Thanks in advance for any help you can provide.

First: Instead of renaming the Grade folder to Grade_old (good idea by the way - always good to have a backup), make a copy as grade_old, and decompress the new gradebook over the original Grade folder. The Enhancement only overwrites a few files in that directory. So if you just decompress it into a new Grade directory, you will be missing Exceptions.html and Exceptions.php.
That most likely isn't the problem, but could cause something unforseen later.
Second: From your screenshot it doesn't look like you have the points column listed. The Enhanced gradebook only allows editing of the points column (not percent, etc). So try turning on the points column, and let me know if that allows you to edit. Other than that, everything looks to be working.
- Dan Sherman
Rob
Currently is the only option to call the exams "assignments" and indicate that they are offline?
I am using version 1.5.
The Exam module sounds like it could save me some time in grade entry, as long as it is dependable. I am currently using the "offline assignments" option to enter all of my grades.
I guess the question that I have is, "How stable is your current module for entering/uploading offline grades?" Maybe a better way of stating the question is the more general, "Is there anything more I should know about installing the module?"
Thanks
When that is finished, I will post the update in the download area of my web site. I would say that the currently available download is perfectly safe to use, if you are using MySQL as your Moodle database. If you are using Postgres, then you should do extensive testing in a nonproduction environment first (and report to me if you find any bugs).
As for installing it, you just need to copy the exam folder into your Moodle mod/ folder, copy the exam.php file into the lang/en folder, then go to your Moodle administration page. The exam module will then install itself. It will then appear in the "Add activity" menu when you edit a course, just like all the standard modules.
Thats the only reason I didn't use it (I actually was using it for a while) was that teachers got confused between where to edit what and where to create what. If I could have this mod editted through the manual grade interface as well as your own it would alleviate that issue and let me basically replace the assignment mod with yours (well rename assignment something different at least so they know only to use it for special cases) since all the teachers are using this with an actual classroom so the upload stuff isn't used.
I know everyone is busy, but it was just a thought since it looks like the assignment module isn't going to get redone to be usable anytime soon (for a while there they were talking about redoing it for 1.5.3 so it would have been similar to yours, another reason I decided to switch from yours seeing as I thought I'd have the same functionality from the assignment module itself).
Thanks Dan, it looks & works great! I get confused rather easily, so could you confirm:
The download from LinuxBox is the current version (I downloaded on Aug 4), and it is the updated version of manualGrades.zip from Bob Puffer in this thread -- or is that a separate but similar approach to manual grades?
Also, is it possible to enter non-integer grades? I tried entering a 2.5 (out of 3) but it didn't seem to work. Do I need to change a system variable somewhere, or is that constrained by something basic in Assignment logic?
Thanks,
Jim.
The download from the Linuxbox is the newest version. Bob Puffer hired the Linuxbox to write the code for the enhancement.
It is currently not possible to use non-integer grades. Others had requested the same feature, however the answer was this:
Although it would be technically possible to change to accept non-integers, the whole Moodle framework expects integers to be there. We can't tell where down the line this would cause problems, but it is very much setting it up for something bad.
- Dan
Thanks very much for the explanation. Will the download be kept current with Moodle gradebook development? I see it replaces two standard release files.
Jim.
With each release we'll patch it and make sure it works, and re-release on the website.
Now, what I really want is a way of manually editing quiz grades as well - you see we make Moodle use optional for homeworks, and a few of my pupils hand in theirs on printed copies of the Moodle quizzes rather than online - obviously I'd like to store their grades in Moodle too, but can't see any way of doing this other than entering their answers for them, or setting up parallel assignments. Any ideas? Should I ask this in the Quiz forum instead?
Looking at the database, it certainly doesn't look too bad to my very naïve eye.
Yeah, so far setting up a "Paper Quiz XX" offline assignment is what I've been doing also. I believe manual grading of questions is planned, I hope inserting grades for offline users is also being considered.
BTW what is IMO?
Thanks again!
Thanks for this. Have a glance over at the discussion in the quiz forum, if you haven't already.
I've not looked at the LB gradebook code, but from my superficial tweaking of the database, mdl_quiz_grades may be the place where the action is. Data from this table seems to be what's displayed over in the gradebook, but changes here don't appear to affect the quiz result reports themselves.
The structure looks simple enough, with an autoincrementing id, quiz number, user id, the grade and a time stamp.
I've looked into this for contributing to the LB gradebook and found that while changing the sumgrades value in the mdl_quiz_attempts table changes the grade on the Quiz Report page, but changing the grade field in the mdl_quiz_grades table actually changes the grade on the Grades page.
So, I guess to manually edit the grades for quizzes using the LinuxBox gradebook extension we'll need to modify both the sumgrades and grade field in their respective tables?
The only problem I see is with reviewing somebody's answers after manually changing their grade. If you change the score from 1 to 2, when reviewing that quiz attempt, the score will say 2 even if the answers show one correct and one incorrect. Anybody see a problem with this?
Let me know if anybody agrees with all this and I'll start coding it.
Thanks for your work on this.
But, no.
Or, should I say, I'm not absolutely convinced that that's a good idea...
If it were me, I wouldn't touch the mdl_quiz_attempts table at all, as the quiz report page should be just that, a report of how they did on the online quizzes.
If the teacher then wishes to adjust their grade, because of extenuating circumstances, or because they did the quiz on paper (which is what James and I need to deal with), then it should just be the grade (and not the quiz itself) that changes, ie only the result in mdl_quiz_grades.
In the UK we now have a bizarre rule that if your pet dies on the day you take a public exam, you get 2% extra credit (I presume the death has to be before the exam, rather than later on in the day

Also, you'd need to check this but I suspect mdl_quiz_attempts is read from by quiz module a lot more than the other table, and this may have serious implications for some of the code there. Furthermore, the incosistencies in quiz review would affect pupils as well as staff.
If it were me, I wouldn't touch the mdl_quiz_attempts table at all, as the quiz report page should be just that, a report of how they did on the online quizzes.
If the teacher then wishes to adjust their grade, because of extenuating circumstances, or because they did the quiz on paper (which is what James and I need to deal with), then it should just be the grade (and not the quiz itself) that changes, ie only the result in mdl_quiz_grades.
Exactly. Thanks Miles for describing it so well.
Currently I have most teachers teaching multiple classes of the same topic using groups to separate the different sections. It would be easier if there was a group section so they can view the appropriate 30 kids at a time instead of a large list of all 90 they have.
Thanks
Thanks,
Peter
The grading directly in the gradebook feature is a nice addition to the gradebook in my opinion, a good way to see this developed in the main Moodle would be to add it to the bugtracker as a feature request.
Also, I've been trying to modify the JavaScript so that when you click a course then a student, only the intersecting gradeboxes are editable. (The current functionality has all intersecting boxes toggling back to uneditable.) It's pretty confusing so if any of the LinuxBox guys can help me out with that one, I'd be grateful as I feel that this functionality is the most intuitive. (So teachers can isolate ONE assignment for ONE student for example.)
Robert, Thanks for looking into the code and offering to help. The more people, the better it can be. You can either post the changes here (probably the best, so if people want to test it, they can), or email them directly to me at dan@linuxbox.com.
Bob Puffer and I had spoken a lot about the editing of quiz grades. At the time, we couldn't come up with a good method of editing quiz grades. Because of the way quiz grades are calculated (by a method, not a human), changing the grades becomes quite a worrisome task.
Just getting the numbers to change is easy (as simple as replacing a value in the database), however, you run into all sorts of trouble later. Should the student take the quiz again, it will calculate a new score, and use whatever formula it normally would, and very possibly change the teacher-edited grade to whatever the Quiz module thinks it should be.
We debated adding a "Edited" flag in the database so we could say something like "If Edited Flag, don't run the auto-grade feature anymore on this quiz, for this student". However, this broadened the project too much, we would have to make sure the code in both the gradebook, and in the quiz module (not to mention the database) was up to date with future releases.
I'd be more than happy to take a look at whats been added (you very well may have thought a way around it, outside perspectives are awesome).
Robert, as far as the toggling and intersecting of lines, drop me an email at dan@linuxbox.com and we can go through some of the code (sorry the javascript section is so ugly).
IMO, the best way to handle manual quiz grade entering would be to get it working in quiz, then your hacks in the gradebook could just interface with the code in quiz (where it would presumably handle regrading and the like).
I think for the application James and I have in mind, ie manually entering grades for parallel, paper based quizzes, we can live with this, at least until something better turns up in quiz module itself.
I've got no problem with my pupils having another go at the quiz online, and then having their score adjusted automatically - learning from mistakes is cool here, and I'm happy for it to be rewarded - we have grading in quiz set to highest score anyhow. If it really is as simple as you describe, then lets give it a try, with suitable caveats about subsequent attempts if need be.
Thanks Miles for stating it so well, I agree completely. I don't see any great contradiction in supposing that if a student attempts a quiz online again after a manual grade change, the score reverts to an automatic score. And of course for entry of paper-based attemps the question is moot.
In my limited Moodle experience, principal reasons for regrades of online scores so far have included:
1. Students gave unexpected but correct short answers.
2. Students selected an incorrect choice, but when they explained how they had understood the question, I gave partial or even full credit.
3. Students misunderstood the question or the choices sufficiently to make it invalid.
4. Students misread the question for reasons unrelated to content (had the flu, a migraine, domestic argument, etc).
In most cases (1 &2) it has been sufficient to edit the question and rescore. In cases such as 3 and 4, any manual adjustment would be invalidated by retaking the quiz: "I didn't realize that you were asking..." But the next time around they will realize it. Admittedly, most of my quizzes have been set up to allow multiple attempts, and I have a quiz discussion forum associated with each quiz. Still, it seems generally that manual overrides are intended to handle unusual situations, and when a student attempts a quiz again afterwards, the circumstances surrounding that manual override have changed. So if an override flag gets added, it might be a good idea to make setting that flag optional when entering a manual grade (or set the option for the whole quiz in the general information section).
Jim.
- I improved the use of CSS on the View Grades page, to match how the edit page looked.
- I've allowed for editing of quiz grades which just changes the value in mdl_quiz_grades as I agree with Miles that if the student retakes the quiz, then the score should reflect the retake. A more elegant solution should be implemented in the future but I feel this works fine for most purposes.
- This also includes a Sort by Group function since most of my Moodles are for High Schools, when grading by "period" is the preferred method.
- Fixed a bug with the editing JavaScript regex, selected wrong boxes. (Also, left some commented code in there. So please ignore that.)
- I've also been working on a parent login (which is actually pretty much done) so I tried to comment out the parent code in this grade extension, but might not have done the best job. It'll probably just be easier for me to upload an entire site patch since I've modified (IMO improved
) a lot of the code throughout Moodle.
The only issue I have now that I need to figure out is how to make it so it allows me to add more points than the maxgrade so I can more easily do extra credit, and so I can use this to add grades for actually extra credit assignments (it currently will not work once you check to have the assignment be EC, it says anything you enter other than 0 is out of the value range).
So if anyone else thinks that's valuable and knows how to change this. I will love you as well
I had a couple of problems when I tried it out:
- it appears to check that quiz grades are integers - whilst assignement scores had to be, there's no such requirement for quizzes - I standardize mine as a grade out of 10 irrespective of the number of questions, and this caused the script to fail to update one quiz, as there were other quizzes already in the gradebook with non-integer grades.
- am I missing something from the lang files, as my tab is headed editgrades and I have a new sortbygroupname heading?
- like the linuxbox script, this causes Firefox to throw up a 'this script is running slowly, your computer may become unstable' warning repeatedly: I guess this is a problem with my laptop, but do you know if there's any way to work round this?
Apparently this modded gradebook shows each student everyones grades when they login. I am not sure what the issue is, but I wanted to bring it up before anyone else has issues with this.
Please if you have time look into this to see why it mgiht be happening. I used the files from your zip directly so I think it is an issue with the new modifications.
mrjohnston
We'd also like to see the ability, when reviewing the answers in Report/Item Analysis mode, to add any partially correct responses to the quiz as a correct answer, weighted as the teacher wants. This is particularly helpful for the short answer quiz, where a slight misspelling or verbose response is maked as incorrect . An "add" button and data field (for weighting the answer) should do the trick. An automatic regrade on exit would also be super.
I don't know if Moodle has a limit on the number correct answers, if so, this could be an issue. Do you think this might be possible?
Thanks,
Paul
This forum post has been removed
You might want to check with the guys working on the Quiz module itself. Unless I'm understanding incorrectly, it seems like they'd be able to better help on that front.
- Dan Sherman
Thanks a ton for cleaning up the Javascript... This was my first time using it for any sort of actual work, and I can't say I'm a fan... Having to code things 2-3 different ways, just for it to work in the different browsers isn't my idea of fun (leads to ugly code)...
I think someone mentioned they were having a problem with Rob's addition showing "editgrades" in the tabs. This is because he set up the enhancement to use Moodle's multi-language function. However, since this isn't rolled into Moodle (yet), the language packs don't include translations.
If you'd like to use his updated version (I'll be merging it with the Linuxbox version at some point), you can create the language entry for your language if you wish...
To add:
Open: /moodle/lang/XX/grades.php (where XX is your language, "en" for english.
Add the line (anywhere): $string['editgrades'] = 'Edit Grades';
Close.
You can obviously change the 'Edit Grades' to say whatever you like, that was just an example.
You mentioned you had some Parental code commented out in the gradebook? I can't seem to find it (can't honestly say I looked that hard though), any chance you can gimme a line number?
Thanks a bunch, I'll be testing...
- Dan Sherman
Yeah, at the top of index.php I created a dummy isparent() function to return false instead of commenting out all the parent code. There is a bunch of commented out JavaScript that is garbage that I left in there while I was trying to figure out how to make the intersected row/col show up instead of toggling back, so I can send you a cleaner copy if you want.
But I'm now working on moving away from JS for the grades extension because on some of my courses have tons of students and the JS is just locking up or throwing an error when trying to validate everything. I'll post that in about a week or so. Thanks so much for the work you did on this, it's awesome!
I had originally designed it to just be PHP highlighting (refresh on every row/column click), but we (Linuxbox), were designing it for Bob Puffer, who wanted it to be no-reload (more of a spreadsheet feel), so we switched it over for him.
I'd prefer to have it more PHP oriented (much easier to maintain between browsers), but then a lot of the code is going to have to be trashed (not to mention dealing with someone entering something, and then clicking another row before saving (gotta have javascript post the form without "submit", to keep any unsaved changes).
I added a timer to go off every 10 minutes to remind to save changes too.
You'll probably need these styles somewhere:
body#grade-index .grades .gradeerror {
background-color: #990000;
text-align: center;
color: #FFFFFF;
}
body#grade-index .grades .gradesaved {
background-color: #00CC00;
text-align: center;
color: #FFFFFF;
}
Rob
Thanks for your work on the manual grade. I have installed it and it appears to be working well for editing the grades in quizzes and assignments, but does not allow me to edit forums grades. I do notice that I will need to add some strings to /lang/en or did I miss something?
Again, thanks for your work on this.
dawn
This forum post has been removed
I'm having the same problem. This has cropped up in two separate courses on the same server. My problem is that I deleted a whole category, then I get the same error:
"No category to view by"
Here is my debug output:
Array
(
[231] => Array
(
[id] => 231
[0] => 5
[courseid] => 5
[1] => 20
[category] => 20
[2] => 1
[modid] => 1
[3] => 294
[cminstance] => 294
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 1
[sort_order] => 1
)
[241] => Array
(
[id] => 241
[0] => 5
[courseid] => 5
[1] => 20
[category] => 20
[2] => 1
[modid] => 1
[3] => 304
[cminstance] => 304
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 13
[sort_order] => 13
)
[243] => Array
(
[id] => 243
[0] => 5
[courseid] => 5
[1] => 20
[category] => 20
[2] => 1
[modid] => 1
[3] => 306
[cminstance] => 306
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 13
[sort_order] => 13
)
[244] => Array
(
[id] => 244
[0] => 5
[courseid] => 5
[1] => 20
[category] => 20
[2] => 1
[modid] => 1
[3] => 307
[cminstance] => 307
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 12
[sort_order] => 12
)
[245] => Array
(
[id] => 245
[0] => 5
[courseid] => 5
[1] => 20
[category] => 20
[2] => 1
[modid] => 1
[3] => 308
[cminstance] => 308
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 14
[sort_order] => 14
)
[226] => Array
(
[id] => 226
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 289
[cminstance] => 289
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 2
[sort_order] => 2
)
[227] => Array
(
[id] => 227
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 290
[cminstance] => 290
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 0
[sort_order] => 0
)
[228] => Array
(
[id] => 228
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 291
[cminstance] => 291
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 3
[sort_order] => 3
)
[229] => Array
(
[id] => 229
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 292
[cminstance] => 292
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 4
[sort_order] => 4
)
[230] => Array
(
[id] => 230
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 293
[cminstance] => 293
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 5
[sort_order] => 5
)
[233] => Array
(
[id] => 233
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 297
[cminstance] => 297
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 6
[sort_order] => 6
)
[236] => Array
(
[id] => 236
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 300
[cminstance] => 300
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 8
[sort_order] => 8
)
[237] => Array
(
[id] => 237
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 4
[modid] => 4
[3] => 29
[cminstance] => 29
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 1
[extra_credit] => 1
[6] => 9
[sort_order] => 9
)
[238] => Array
(
[id] => 238
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 301
[cminstance] => 301
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 11
[sort_order] => 11
)
[239] => Array
(
[id] => 239
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 302
[cminstance] => 302
[4] => 1.0000000000
[scale_grade] => 1.0000000000
[5] => 0
[extra_credit] => 0
[6] => 10
[sort_order] => 10
)
[240] => Array
(
[id] => 240
[0] => 5
[courseid] => 5
[1] => 25
[category] => 25
[2] => 1
[modid] => 1
[3] => 303
[cminstance] => 303
[4] => 1.5000000000
[scale_grade] => 1.5000000000
[5] => 0
[extra_credit] => 0
[6] => 7
[sort_order] => 7
)
)
This forum post has been removed
This forum post has been removed
I'll check the other bug out a bit later. So it's when you remove the last assignment from a category? Or, removing an assignment from a category with more than one assignment?
The only features I have left from when I started using moodle now is to be able to enter more points than the assignment is worth in cases of extra credit, without making it out of more points and then using curve to, and trying to make the screen you see when you click on an assignment link back to this edit script so teachers never think to use the other interface (ugh, popups bad).
Side question, if I want to allow more points than the total that's in the javascript bounds checking, right? I am trying to figure out what to try and learn enough of to fix my last minor issues.
This forum post has been removed
This forum post has been removed
This forum post has been removed
I'll wait a bit to post another install but will try to make it a good one when I do.
I think that'll be a good time to start again from the far left of the screen as we are shrinking here
Thanks so much for all your work. Something tells me the next release is going to make me satisfied with the grading aspect of moodle. And your parent work looks awesome to for me as I am secondary. For now we just disabled changing password's, etc. so parents and students use the same account.
Fatal error: Cannot redeclare isparent() (previously declared in /home/cdc/public_html/moodle15/grade/index.php:5) in /home/cdc/public_html/moodle15/grade/lib.php on line 34
The linux box version was working ok.
Oh, commented isparent() out in index.php and it started working.
This doesn't seem to happen on your site is there a more recent version of lib.php/grade.php?
On your schoolengine site when I roll over the link to and activity name, I get the proper link to the activity. But on the download, the rollover gives me "javascript:void(0)". It also gives me this when I click a student's name.
Actually, when I click the student's name I get "Extra user Information" boxes printed out below the grades. What is this for? It seems confusing to have clicking the student's name behave this way.
I notice on the schoolengine site it behaves differently, clicking the student's name focuses on the student, but the second click (which should open the student's profile to conform with the standard behavior) doesn't do anything?
I'll make the second click go to the profile though, that's a good idea.
This looks like great added functionality

I need to edit some quiz results and I've just uploaded the files from this thread (grade_fix_1.zip and grades.php) but have hit a snag. When I try to update (click "Save Assignment Grades") I get hit with a few "Invalid Input (not a number):" errors which are basically people with a score that includes 2 decimal points (e.g. 20.68 out of a possible 21).
Any suggestions?
Regards
Harry
This forum post has been removed
Martin still might be working on the commercial end, I know he was doing that heaviy recently so he was relatively inactive. I don't know if thats progressed to a more hands-off point or not, or how much longer it'd be till he reaches the poiint he has it all setup to work easily and can step away from it a bit.
Re my issue above, trying to change individual grades but unable to due to "error" messages.
Basically I have a quiz that people are allowed three attempts at. If they fail after the third attempt, an assessor gets in touch and talks them through it. When the assessor is confident the person knows the subject we want to update their grade (in this case to 21 out of 21) for our records.
At the moment if there are others who have only attempted the assessment (quiz) 1 or 2 times and have not got 21 out of 21 this stops me being able to upgrade an individual (I believe it's due to decimal points in a grade). Is there any way around it at the moment?
Regards
Harry
Sorry to be a pain in the proverbial but I would really appreciate some help with the above issue. The inability to update an individuals grade is having a detrimental affect on my trial site.
Hope to hear from someone soon

Regards
Harry
Hi Rob, if you have your own CVS account you might think about putting the files there?
That might make it easier for folks to collaborate on it than with a CVS/contrib account. We would certainly be interested in collaborating on this for bug testing and feature enhancement.
We have done that with the MyFiles block, we put the 'final' code in CVS/contrib but since we have several developers working on it we keep a separate CVS account for development.
I contacted Martin about CVS access and should have that going soon. I'll keep you all posted.
And it allows to add comments to grades.
The solution can be tested in this address
http://parles.upf.es/TEST/
you can check the utility and download the patch. Other patches are available:
to copy activities and to allow a maximum number of words in a grade.
There is also a translate module that uses AJAX techniques to get the translation of the selected word in the page
Enjoy it
to log in
user: teacher pass: teacher
In the same site there are two new language utilities that use Ajax techniques to update the data:
One is a block that I supose I will release in the next days, is very simple, is attached to a dictioanry and shows the translation of a selected word in text, and another one that is a floating window that gives the results of the search in a corpus of a given word (a set of sentences where this phrase appears) these ones are still being tested and suggestions are wellcome. you can find more information here: http://moodle.org/mod/forum/discuss.php?d=31917
These are still as Beta.
I've also moved the category select to the top, but have not uploaded the changes as I'd like to get them into CVS somewhere so it is not so crazy in here. Should I contact Martin about getting a CVS account or someone else? Let me know and I'll get these new changes (and more) into CVS.
Or Martin could give you a direct account if you all want to do it yourselves.
Thanks for these features in the gradebook, I'm going to get them set up here for the next semester either way
This forum post has been removed
Rob
I've been away from this discussion for a while and would like to get the latest version of your mod. Would you point me in the right direction?
Thank you for your work on this.
dawn
I'd just like to say thanks for stepping in on this. I haven't had much time recently to keep on top of the code, so thanks for keeping it going and adding so much.
Use this to download my moodle_15_stable_mods module, which includes the minimum amount of files to overwrite.
:pserver:anonymous@cvs.schoolengine.com:/usr/local/cvsroot
Please note I'm still updating this and it's missing tons of files probably, but it should be semi-safe to download a bit later. If you find any bugs, email me rob@schoolengine.com as I don't want to fill them up here (at least at the beginning).
-LD
Our professors would really like to see the following in future versions of Moodle (if not sooner

- Ability to download all submitted student files with one click, instead of downloading each individually from every student
- Ability to upload feedback and grades (as indicated here in this forum) with a single screen instead of going to each individual students assignment.
Any help and/or suggestions are greatly appreciated.
Keep up the great work!
- The name of the assignment (upload)
- The username of the student
If anybody's got any great ideas regarding this or any great code that meets these needs, let us know.
Thanks
I am trying to download the gradebook add on. I think I found it in the CVS archive in the folder contrib/gradebook plus. I am not real sure how to use CVS, but I beleive I can just download those files. Are there any specific installation instructions?
Thanks,
Peter
http://cdc.humboldt.edu/moodle/course/view.php?id=3&topic=1
Michael Penney's group has taken work we originally did and melded it with changes made by Rob Barreca and fashioned it into a more stable, more useable product.