Gradebook_CDC update in CVS

Gradebook_CDC update in CVS

by Michael Penney -
Number of replies: 34

Hi all, Jeff just whipped out an updated version of our gradebook (in CVS as gradebook_cdc).

Here is a quick overview of what has occurred since the last release to
the public we did.

- New Features
     - Hidden Categories: removed from grade tallying and display
     - Extra Credit: set an assignment to extra credit so it's points don't count in the category total*    
       - Exceptions: exclude individuals from assignments.**

*so you can add an x point activity as extra credit to a category with activity(ies) worth a total of y. Points are added to student scores for activity x, but the points from activity x don't add to the total of y.

**Exceptions: highly requested by our faculty, you can make an assignment or a bunch of assignments not count for an individual against the course total. Used when there is a personal emergency, or when sections merge early in the semester (but after some assignments have been done).

- Code cleanup
- Fixed lang file to only include strings (no html and no pictures)
- All printed text (I think) moved to the lang file

     - fixed array referencing
     - removed majority of SQL calls and replaced with Moodle API
functions. The remaining SQL statements are isolated at the top of
gradeslip.php.
     - fixed some erroneous typings of isTeacher() to isteacher()
     - removed MySQL specific SQL
     - changed all internal function names to be preceded by 'grade_' to
avoid conflicts with moodle central API
     - separated code into grades.php and gradeslib.php where it made sense
     - major overhaul of grade calculating portions so no calculations are
done at the display time

The next thing is some work on outside events, to make it a nice, simple way to add an external graded item.

If you all could help test it, that would be great, just go here;

and login as test/test.

Thanks!

In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Cypercat Saint -

Ok I downloaded everything from cvs - and uploaded to the server and everything looks good however on your test site you have download to an excel file but that doesn't show up on my test site. Did I miss a file?

Thanks for all your time and effort in this module.

In reply to Cypercat Saint

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Cypercat,

No you didn't miss anything that server is our development server so you saw the next version which should be in CVS soon.

Jeff
In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Lisa James -

Hello,

I like the demo of your gradebook and am looking forward to the 'import grades' implementation.  However, I already installed Jason Cole's 'Gradebook 2', which altered the database.  Does your gradebook cooperate with Gradebook 2?

Thanks!

In reply to Lisa James

Re: Gradebook_CDC update in CVS

by Michael Penney -

Hi Lisa, Gradebook 2 alters the way modules store grades, so it will not work with our Gradebook, sorry.

You'd have to revert back to a standard Moodle install.

In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Lisa James -
Thanks - I reverted to previous version and installed your gradebook, which works beautifully - very intuitive.

Can you please post on this topic when 'upload grades' is working, as I will remain subscribed to this thread ... and eagerly awaiting.

Thank you again for such a great module.

Lisa
www.luvmath.com
In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

Hello,

I don't know for the last version because I use my own modified version of the first release and I made so many modifications (gradebook2 aka gradebook_sfsu in CVS is still a english only work and I need french language) but I am pretty sure that Gradebook2 doesn't alter the way modules store grades, it only store a copy of grades in its own tables. So I see no reason preventing you to run gradebook_sfsu and gradebook_cdc on the same site even if it is a rather strange idea !!

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by Michael Penney -
Well I'm corrected themsmile. Gradebook_CDC works off the standard grades tables in the modules, so if the standard Moodle gradebook still works with Jason's gradebook, then our's will also.

In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Jason Cole -
The sfsu gradebook replaces the original gradebook tables with a centralized grade table. So our gradebook won't work with either the original gradebook or the CDC gradebook.

In the current version on CVS there are replacements for the existing module files that deal with grades. For our gradebook to work, the module files have to be replaced so they write their grades to the central grade table instead of a module based table.
In reply to Jason Cole

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

The sfsu gradebook replaces the original gradebook tables with a centralized grade table. So our gradebook won't work with either the original gradebook or the CDC gradebook.

In the current version on
CVS there are replacements for the existing module files that deal with grades. For our gradebook to work, the module files have to be replaced so they write their grades to the central grade table instead of a module based table.

Jason I looked in the files in your last CVS and (as in your first release that I know better)  I can state that this is not the case !! gradebook_sfsu files in the mod subdirectory currently doesn't change in any way the storage of the grades in the mod (quiz, forum, assignment, I only looked at these 3 ones but I suppose it's also true for others mods) tables ! They just store a copy of the grade in gradebook centralized tables (and this is quite understandable because not doing so would mean a lot more work !!). So nothing today (I don't know your plans for future evolution) prevent it to coexist with original gradebook or gradebook_cdc.

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by Jason Cole -
Ah... sorry... I really need a vacation..

I was  thinking about our internal version that turned off the old functionality to make sure we didn't break anything.

Again, my apologies...
In reply to Michael Penney

Just updated CVS with Excel export

by Michael Penney -
Export is raw points, not the weighting/curving formulas.

No import yet. Probably be a while for this.


In reply to Michael Penney

Re: Just updated CVS with Excel export

by Cypercat Saint -

I re-downloaded all files on the cvs - uploaded them to server but still not seeing the excel export.

Help

In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Nicole Snyder -

Hello, i get the following error after installing the new gradebook, I am running 1.4.2

Warning: Invalid argument supplied for foreach() in /home/.../public_html/moodle/course/gradeslib.php on line 186

Warning: Invalid argument supplied for foreach() in /home/.../public_html/moodle/course/gradeslib.php on line 207

Warning: Invalid argument supplied for foreach() in /home/.../public_html/moodle/course/gradeslib.php on line 248

No grades returned

What should I do??

Thanks,

Nicole

In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Marc Dastous -

Michael;

I imported my grades from another live installation to test your gradebook. I'm loving it so far!!!  I have posted 4 issues that I have found in my installation on the bug tracker. 

I installed the files with Moodle 1.4.2+ (2004083127)

Let me know when you need more testing donebig grin

Marc

In reply to Marc Dastous

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

Hello,

I began to test the "Drop X lowest" feature of gradebook_cdc and I have a problem with it:

All my activities are set to 20 points value each one so this is not the "If you use drop x lowest the grading assumes that all items in the category have the same point value. If point values differ results will be unpredictable" problem.

first test : category with 12 grades in it set to drop 11 lowest, it works, Total (11 Lowest dropped) Points (20) is displayed

second test : other category in the same course with 12 grades also in it, set to drop 11 lowest and this time Total (11 Lowest dropped) Points (240) is displayed

Should be Points(20) and not points(240)

I can provide screen copies if it help.

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Jean-michel,

Thanks for calling this error to our attention, no screen captures necessary as your explanation is clear.

Just to clarify, were the grades calculated correctly, and just the total incorrectly displayed or were the grades given calculated as though the category was worth 240 points?

Thanks,
Jeff
In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

Just to clarify, were the grades calculated correctly, and just the total incorrectly displayed or were the grades given calculated as though the category was worth 240 points?
Very difficlult to said because in my case in fact each student has only 1 grade out of the 12 in the category (this is the reason why I use "drop lowest 11" : I can group 12 differents tests submitted in small students groups in computer labs) so the resulting grade is in fact the only grade each student has.

And this is working as expected : if for instance a student has :

- - - - - 16 - - - - - - the grade for the category is 16 (good) so from my point of view only the displayed total (260) is wrong. And what I don't clearly understand is why for the first category it worked (the total displayed for the category is 20 as expected).

As You see I don't use %, only points and points total, but just to test I displayed percentages and a student having 20 is displayed as 8.33% (EVEN FOR THE FIRST CATEGORY showing points (20) in the header) so clearly it is counted as 20/240 = 8.33%

Next Monday I am starting the 3rd category with 12 other tests so just to better understand the problem I created a 3rd category with another serial of 12 tests and it also showed as points(240).

Concerning you gradebook implementation, May I add that I find the GUI very well done and I just had a look at the code but it appear very structured and clear.

I don't know if I am the only one using it on a non english website but there is still some hardcoded strings in grades.php :

 if ($preferences->use_advanced ==0) {
  print '<option value=0 selected>No</option><option value=1>'.$stryes.'</option>';
 }
 else {
  print '<option value=0>No</option><option value=1 selected>Yes</option>';
 }

should be :

 if ($preferences->use_advanced ==0) {
  print '<option value=0 selected>'.$strno.'</option><option value=1>'.$stryes.'</option>';
 }
 else {
  print '<option value=0>'.$strno.'</option><option value=1 selected>'.$stryes;'</option>';
 }

Again thanks a lot for this nice Moodle addition.

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Jean-Michel,

Thanks for the clarification this will help to resolve the situation ASAP.

Also, thanks for pointing out where I missed a few lang file mistakes, and the complement for the GUI and code work smile

Glad you like it.

Hopefully I can get these issues resolved tomorrow as I will be on vacation for a week starting Friday.

Jeff
In reply to Marc Dastous

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Marc,

thanks for testing and submitting a bug report!

Adding an exception
Error occurred while adding exception for userid: 62 to grade_item 59

This error only shows up if it did not insert the record. Can you give me any more information as to what led up to this? Was the user excluded regardless of the error message? Did you click the submit button twice or hit refresh? My initial thoughts are that it tried to insert the user twice.

Thanks,
Jeff
In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Marc Dastous -
I attempted to move students from one column to the other; that is when the error occurred.  It did not display the student's name in the right column (exception), nor did it remove it from the left column.

I had not tried to put anyone in the exception column previously.

Marc
In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by Jay Lloyd Neal -

Are you going to be able to add support for custom scales in Forums? Forum assignments with custom scales aren't showing up in our system when viewed through gradebook_cdc interface (cvs from 11/15)...

cheers

p.s. Very nice overall. When everything is sorted out, my faculty will love it.

In reply to Jay Lloyd Neal

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Jay,

Unfortunately the forum module does not return a max grade as per the moodle API when the custom scale is used so currently these entries are ignored. There is no way to calculate a grade if no maximum is given.

If you have any ideas as to how this should be resolved I am interested.

Jeff
In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Nicole Snyder -

Hello Michael,

I have noticed a serious security problem with the new gradebook. At my site all users are course creators since we allow students to create their own study groups. It appears that anyone with creator status can change things in a gradebook even if they are not listed as the teacher of that course.

What can I do to fix this problem?

Thank You,

Nicole

In reply to Nicole Snyder

Re: Gradebook_CDC update in CVS

by Jeff Graham -
Nicole,

I saw your post in the other thread, thanks for bringing this to our attention. I have already fixed this issue and it will be in next version that shows up in CVS. Michael will probably make a post when it is available.

Regards,
Jeff
In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

Hello,

I tried the files now in CVS sinc a few hours but I still have problem with the drop x lowest feature. Here is the result for the first students (I replaced the names for privacy and activated the display of most options I don't use just to see the effect, so most of my students will see an F as their lettergrade, I hope they don't mind rouge. All the data in red are (I think) incorrect .

Student

Test 1 Stats(50.00%)

Test 2 Stats(50.00%)

Total Stats

points(20)

Percent

Weighted % contribution

points(240)

Percent

Weighted % contribution

points(260)

%

weighted %(100)

Letter Grade

Student A

20

100%

50%

16

6.67%

3.33%

36

13.85%

53.33%

F

Student B

12

60%

30%

6

2.5%

1.25%

18

6.92%

31.25%

F

Student C

20

100%

50%

11.2

4.67%

2.33%

31.2

12%

52.33%

F

Student D

16

80%

40%

14.68

6.12%

3.06%

30.68

11.8%

43.06%

F

Student E

20

100%

50%

7

2.92%

1.46%

27

10.38%

51.46%

F

Student F

13.32

66.6%

33.3%

12

5%

2.5%

25.32

9.74%

35.8%

F

As I said in a previous message Test 1 and Test 2 are 2 categories with 12 tests in each (each test max grade is 20) and each category is set to drop 11 lowest.

The only students that don't get an F are those with no grade in Test 2 (don't come and your grade will be better not exactly what I expected sourire)

Positive note : Percent and Weighted contrib are now correct for 1st category (they were not in the previous version) so there is some progress.

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by Jean-Michel Védrine -

I found the bug !

in gradelib.php

lines 1881-182

   $dropcount = 0;

should be after  foreach($all_categories as $category => $assignments) {

and not before.

Now everything seems to display as expected

Note : savechanges and savepreferences lang strings are missing

In reply to Jean-Michel Védrine

Re: Gradebook_CDC update in CVS

by James Ballard -
Note : savechanges and savepreferences lang strings are missing

Is this still the case. My button is showing savepreferences on the submission.php page of the assignment grading page. Which file should the string go into - I have tried lang/en/assignment.php with no luck.
In reply to James Ballard

Re: Gradebook_CDC update in CVS

by Michael Penney -
Are you using Moodle 1.5?

Gradebook_CDC is the standard gradebook in 1.5, no reason to get it from CVS. Gradebook_plus is an enhanced version of the standard 1.5 gradebook, is that what you were looking for?
In reply to Michael Penney

Re: Gradebook_CDC update in CVS

by James Ballard -
Hi,

I was actually wondering how to correct the following button:

savepreferences button
I can't find a corresponding string, and this seems to be a similar problem.

Yours
James


In reply to James Ballard

Re: Gradebook_CDC update in CVS

by Michael Penney -
Hi James, that is a problem with the new quickgrading feature in the assignment module, not the gradebook. It looks like the language files didn't get installed during the upgrade.

You might try asking over in the assignment module forum.
In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Jay Lloyd Neal -

Okay, I don't know which variables are currently used to display custom scales/forums in the simple 1.42 gradebook, but there is a max grade being used to calculate averages for multiple ratings... It may not be available per the moodle API, but it's available somewhere.

For example, let's look at an example of a custom Scale (from least to best according to the custom scales instructions): 

  • No credit- This is not really relevant to this discussion
  • Deficient- It's just a little relevant to this discussion
  • Adequate- It adds some interesting points to this discussion
  • Above Average- Valuable contribution to this discussion
  • Superior- Extremely valuable contribution to this discussion

The ratings that a student has received for any forum will then be summarized in the basic 1.42 gradebook like this:

Adequate (9)
1/0/1/4/3

In the above example, the student's posts in the forum had 9 ratings.

The max score would be 4, since that is dictated by the number of slots in the custom scale rubric, with the first slot counting as "0."

No credit- This is not really relevant to this discussion (1 rating)
Deficient- It's just a little relevant to this discussion (0 ratings)
Adequate- It adds some interesting points to this discussion (1 ratings)
Above Average- Valuable contribution to this discussion (4 ratings)
Superior- Extremely valuable contribution to this discussion (3 ratings)

and the "average" of all those grades:

((0+2+12+12=26)/(9*4=36))=72% and 2.9 "adequate" will be entered into the gradebook.

Because of the weighting and percentage features of Gradebook_cdc, the numerical averages of even a 4 point maximum can be made relevant to the overall grades.

I hope this idea helps... It's better than no entry for custom scales, I think.

In reply to Jay Lloyd Neal

Re: Gradebook_CDC update in CVS

by Jeff Graham -

Jay,

Thanks for your reply. The problem here is one associated with the forum module. It does not return a max grade as suggested by the module template (there is no API for this, my mistake in suggesting so). So if the grade is to show up in the gradebook and count towards a students grade we should expect the module to let us know what the maximum available should be, right? I do not quite follow your calculation of a grade. Where do the numbers 0+2+12+12 come from? How do we know these are correct? Regardless, all of these details should be handled by the module and the results returned as a max grade in the module lib.php file.

Michael has suggested to assign 100 as the max grade for any graded item that does not return a max grade. I think this is probably the most correct/universal solution as any other number is to some effect going to be arbitrary. If it should be something else then the module should let us know. The scale grade in the advanced settings could be used to to adjust the assumed max grade of 100 as appropriate.

I think this is the solution we will go with as any other solution overly complicates the gradebook when it is the modules responsibility to return a max grade. This way graded items are not "thrown out" as well.

Jeff

In reply to Jeff Graham

Re: Gradebook_CDC update in CVS

by Jay Lloyd Neal -

Adequate (9)
1/0/1/4/3

>>Where do the numbers 0+2+12+12 come from?

9 entries.

slot 1 = 1 entry @ value 0
slot 2 = 0 entries @ value 1 = null
slot 3 = 1 entry @ value 2 = 2
slot 4 = 4 entries @ value 3 = 12
slot 5 = 3 entries @ value 4 = 12

These numbers are averaged to determine the student's grade on the forum assignment using the old gradebook. Based upon the calculation, the old gradebook displays the verbal rating associated with the averaged value. It works the same way one would report data from a likert-style scale (each response within the range has an associated value distributed along the scale).

All of this is difficult anyway because of grade associations, even on a 100 scale. Does a consistent bottom rating equal an F (50%) or a Zero? Does a consistent middle or average rating equal a C (average, or 75%) or dead center on a four point scale (50%)? I guess from your reply that you will be able to handle an arbitrary number of ratings for a single forum assignment and weight those into the average. In the end, I guess that is all that really matters. As you said, max grades can be weighted in the final tally. Thanks for thinking about all of this.

cheers