Gradebook Plus v2 - Error messages...

Gradebook Plus v2 - Error messages...

by Lael ... -
Number of replies: 11

Posted this in the modules section... but not sure if people really look there...  does anyone know how to fix this problem / find out what the error message really is?...

Hi,
Thanks for this Patch - it looks awesome!
I just installed this with the latest version of 1.8.2, and I am getting two error messages at the top of the screen - just

Error
Error

- the 'edit grades' tab works fine, but the 'manage graded events' does not seem to. When I try to create a new item the message "grade_event wasn't inserted." is displayed.

A small usability thing also... tabbing through the grades goes to the next text box (swaps out of column/ task) rather than down each column... is there to easily change that?

Lael

Thanks!
In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Lael - I try to respond to most of the GBPv2 issues and questions so if I did not respond it was simply that it did not catch my attention. Could you provide the steps for re-creating these error messages. I'm not sure which patch you are referring to; however, if you are experiencing problems please create an issue in the CONTRIB Tracker for the GBPv2 patch. That is my official to do list for the GBPv2 code and then we can track the issue and work toward resolving it. Peace - Anthony
In reply to Anthony Borrow

Re: Gradebook Plus v2 - Error messages...

by Lael ... -
Hi Anthony,
thankyou for your response; I copied the files across to the grade directory (overwriting exisiting files) and copied lang files over and then visited admin>notifications. There were no changes.

The version I used was the latest version - for use on 1.8.2+

The only Error message given is:

Error

Error

at the top of the screen when you visit the gradebook. Is there a way to find out more information about the error?

thanks again for your time and effort - in creating the mod and in updating it, and helping out - very much appreciated!

Lael
In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
What is your setup (especially what database are you using). My guess is that these are errors creating the two tables. This may be a mysql dependent patch - if it is that would be something to work toward fixing. To get more information you can turn debugging on and try to get more information. Peace - Anthony
In reply to Anthony Borrow

Re: Gradebook Plus v2 - Error messages...

by Lael ... -

You were spot on...

here is the debugging output...
- - - - - - - - - - - - - -

Table 'testmoodle.mdl_grade_events' doesn't exist

SELECT * FROM mdl_grade_events WHERE course = '9'
  • line 677 of lib\dmllib.php: call to debugging()
  • line 601 of lib\dmllib.php: call to get_recordset_sql()
  • line 569 of lib\dmllib.php: call to get_recordset_select()
  • line 862 of lib\dmllib.php: call to get_recordset()
  • line 847 of grade\lib.php: call to get_records()
  • line 60 of grade\index.php: call to grade_set_uncategorized()

Error: Invalid context creation request for level "70", instance "48".
  • line 1735 of lib\accesslib.php: call to debugging()
  • line 1894 of lib\accesslib.php: call to create_context()
  • line 748 of grade\lib.php: call to get_context_instance()
  • line 205 of grade\lib.php: call to grade_get_grades()
  • line 2604 of grade\lib.php: call to grade_get_formatted_grades()
  • line 84 of grade\index.php: call to grade_view_all_grades()

Error: Invalid context creation request for level "70", instance "56".
  • line 1735 of lib\accesslib.php: call to debugging()
  • line 1894 of lib\accesslib.php: call to create_context()
  • line 748 of grade\lib.php: call to get_context_instance()
  • line 205 of grade\lib.php: call to grade_get_grades()
  • line 2604 of grade\lib.php: call to grade_get_formatted_grades()
  • line 84 of grade\index.php: call to grade_view_all_grades()

Error: Invalid context creation request for level "70", instance "57".
  • line 1735 of lib\accesslib.php: call to debugging()
  • line 1894 of lib\accesslib.php: call to create_context()
  • line 748 of grade\lib.php: call to get_context_instance()
  • line 205 of grade\lib.php: call to grade_get_grades()
  • line 2604 of grade\lib.php: call to grade_get_formatted_grades()
  • line 84 of grade\index.php: call to grade_view_all_grades()


Notice: Trying to get property of non-object in C:\Inetpub\wwwroot\testmoodle\grade\lib.php on line 748

Notice: Trying to get property of non-object in C:\Inetpub\wwwroot\testmoodle\grade\lib.php on line 748

Notice: Trying to get property of non-object in C:\Inetpub\wwwroot\testmoodle\grade\lib.php on line 748
Error: Invalid context creation request for level "70", instance "".
  • line 1735 of lib\accesslib.php: call to debugging()
  • line 1894 of lib\accesslib.php: call to create_context()
  • line 748 of grade\lib.php: call to get_context_instance()
  • line 205 of grade\lib.php: call to grade_get_grades()
  • line 2604 of grade\lib.php: call to grade_get_formatted_grades()
  • line 84 of grade\index.php: call to grade_view_all_grades()
- - - - - - - - - -
what I don't understand is why the table doesn't exist - do you know what the best way forward is?

EDIT: - using mysql for db, iis5.1 on w2K server, php 5

In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Lael - After you installed the code, did you go to the /admin/index.php page? That should trigger for the creation of those 2 tables (if I remember correctly). Peace - Anthony
In reply to Anthony Borrow

Re: Gradebook Plus v2 - Error messages...

by Lael ... -
yeah, I did... and that is the thing I was surprised at... that they didn't create - and haven't in the multiple times I have been there since...

I have tried re-replacing the grade folder again, but with no effect. I have also tried deleting the contents and restoring to the original contents of 'grade' - which works fine, but when replacing the gradebook plus mods; there is no change in the gradebook plus behaviours...

What do you think?
In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Lael - OK, I went back and did a fresh install of Moodle 1.8 and then I added the GBPv2 patch. To trigger the update, you go to a course and click on grades. This is where you are getting the double failure. The question is, why are you not able to create the tables? You may have mentioned this but just to make sure, did you copy over the /grade/lang and /grade/db folders as well? You may want to try and open the file /grade/db/mysql.php with a text editor and try to execute the create table manually (remember to replace the $CFG->prefix with whatever you are using - mdl_ by default). Not having all of the files would be my next guess. Peace - Anthony

-- updated --
Actually if the /grade/db/mysql.php file were not there you would get a fatal error so something is causing your create table commands to fail. Does the mysql user that you are using for Moodle (the one in the Moodle /config.php file) have create permissions on the database?
In reply to Anthony Borrow

Re: Gradebook Plus v2 - Error messages...

by Lael ... -

ok - I looked; both copies of the install (local and server - are both having the same problem) have users with full privileges to the relevant database. Both also have the grade_events_grades table - just not grade_events...

when trying to run the query manually to create the tables (through phpmyadmin) the following was returned: "#1101 - BLOB/TEXT column 'description' can't have a default value"

does this shed any light on anything?

the mysql.php file I downloaded looks like this:

<?php

function create_tables() {

global $CFG;
       
execute_sql("
  Create table `{$CFG->mdl_}grade_events` (
            `id` int(10) unsigned NOT NULL auto_increment,
            `course` int(10) unsigned NOT NULL default 0,
            `name` varchar(255) NOT NULL default '',
            `description` text NOT NULL default '',
            `grade` decimal(11,2) NOT NULL default 0.00,
            `timemodified` int(10) unsigned NOT NULL default 0,
            PRIMARY KEY  (`id`));
            ");
           
execute_sql("
        Create table `{$CFG->mdl_}grade_events_grades` (
                `id` int(10) unsigned NOT NULL auto_increment,
                `event` int(10) unsigned NOT NULL default 0,
                `userid` int(10) unsigned NOT NULL default 0,
                `grade` decimal(11,2) NOT NULL default 0.00,
                `teacher` int(10) unsigned NOT NULL default 0,
                `timemarked` int(10) unsigned NOT NULL default 0,
                PRIMARY KEY  (`id`));
            ");
}


?>
 -  I assume that is normal?

Any further ideas of what might be wrong?

Lael 

In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Lael - Not being able to assign a default value sounds possibly reminiscent of STRICT TABLES in your MySQL installation. Turn strict tables off, restart MySQL and try it again. I suspect it will work just fine. Peace - Anthony
In reply to Anthony Borrow

Re: Gradebook Plus v2 - Error messages...

by Lael ... -
Anthony,
Just came back to this thread and realised I had not said thankyou. My apologies! Your help was spot on, and incredibly helpful! Thanks for all the time you spent helping me to sort out what was going on. MUCH appreciated!

Lael
In reply to Lael ...

Re: Gradebook Plus v2 - Error messages...

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Lael - You are most welcome. I'm glad we were able to get your issues resolved so that you can get back to teaching. Happy Moodling - Anthony