Calculated columns in gradebook

Re: Calculated columns in gradebook

by W Page -
Number of replies: 6

Still "messing" with this code,

I decided to remove each function in the "course/gradeslib.php" that the error message pointed out.  When I removed one function from the script another would display.  I removed all of the following from the "course/gradeslib.php" eventually,
function best()
function grades_step($a)
function step()
function sum()
function is_legal_formula($formula)
function prettify_formula($formula)
function sequence($matches)
function expand_formula($formula, $coffset)
function calculate_grade($formula, $grades, $maxgrades, $highestgrades, $averagegrades, $coffset)

All of these functions were already present in the "course/lib.php" file.  I did not compare any of the same functions between the files except for the best() function which I referred to in a previous post above.

I eventually got a page like the one attached.  Is this how it should look?

Were those the correct functions to remove?

Also when I clicked on the words "Scientific Method" I was taken to the "Shelf" module.  Was this suppose to happen?  You can see the shelf icon is also at the top of the column.

WP1

Attachment grades_page.jpg
In reply to W Page

Re: Calculated columns in gradebook

by W Page -

I have one last persistent problem with this script,

Although I have been able to get the "Grades Page" to display, I am not too sure about the database which goes along with it.

As I noted in a previous post, when I clicked on the "Admin" link I did not see the usual database information that I usually see when I install a module.

I reuploaded,
moodle/lib/db/mysql.php (original post - Tues, 25 Nov 3, 8 AM)
moodle/lib/db/
mysql.sql (original post - Tues, 25 Nov 3, 8 AM)

I clicked on the "Admin" link again and just saw the word "Success" at the top left of the MOODLE "Admin" screen.

When I went back to the "Admin" screen to work on something else I saw the word "Error" in the top left of the MOODLE "Admin" screen.  This "Error" word now persists in that location.

Anyone have any ideas as to how I can correct this problem?

Please see attached image

WP1

Attachment upper_left.jpg
In reply to W Page

Re: Calculated columns in gradebook

by Bruno Vernier -
I like the gradebook very much too smile

Here is how I integrated gradebook into moodle 1.2 dev:

1. I kept Martin's grade.php and grades.php and renamed Gustav's grade.php and grades.php to gradebook.php and gradesbook.php. (gradeslib did not need to be renamed)

2. I searched and replaced "best" with "gbest" in gradeslib

3. I searched and replaced "grades.php" with "gradesbook.php" in gradesbook.php

4. I added a link to gradesbook.php (for teachers) and gradebook.php (for students) in the skin (in my case, header.php)


it works smile but should be considered a temporary hack until someone properly rewrites the gradebook application smile
In reply to Bruno Vernier

Re: Calculated columns in gradebook

by W Page -

Thanks for your input Bruno.  I am going to install the latest version of MOODLE on another site and try the changes you suggest in your post.

Some problems perists with the present install.  I am using the experience I am having with "GradeBook" as a learning opportunity.

PROBLEM 1
You can see on the image in the previous post that the words "Scientific Method" is in the first column.  It is a hyperlink.  When I clicked on the link I was taken to another module called "Shelf. Infact you can see the "Shelf" icon at the top of the (on top of) "Scientific Method" hyperlink. 

PROBLEM 2
After uploading the files, when I clicked on the "Admin" link I did not see the usual database information that I usually see when I install a module.

I reuploaded,
moodle/lib/db/mysql.php (original post - Tues, 25 Nov 3, 8 AM)
moodle/lib/db/mysql.sql (original post - Tues, 25 Nov 3, 8 AM)

I clicked on the "Admin" link again and just saw the word "Success" at the top left of the MOODLE "Admin" screen.

When I went back to the "Admin" screen to work on something else I saw the word "Error" in the top left of the MOODLE "Admin" screen.  This "Error" word now persists in that location.

PROBLEM 3
When I clicked on the "Download in Excel" button I got the following errors with some machine "Jibberish" right after it,

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 241

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 242

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 243

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 244

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 245
ÐÏࡱá>þÿ þÿÿÿþÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
l É $strgrades=¼%r8X"1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial1È
Arialàõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À à À à
À ÿâ8ÿÿÿÿÿÿÿÿÿÿÿÿÀÀÀÿ3fÿÿÌÌÿÿffÿfÌÌÌÿÿÿÿÿÿÿÿÌÿÌÿÿÌÿÌÿÿÌÿÿÌÌÿÿÌ3fÿ3ÌÌÌÿÌÿÿfff
3f3f33333f33333) $strgrades l É*+Á¡"dXXà?à? Given
nameSurname#Shelf: Scientific Method - StudentStudent 0 0 0
0 0 0 0 0 0)ð?(ð?'è?&è?> ¶ Root EntryÿÿÿÿÿÿÿÿþÿÿÿBook
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

When I clicked on the "Download in text" button I got the following errors with some data (with no delimiters) right after it,

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 284

Warning: Cannot add header information - headers already sent by (output started at /homepages/30/d94988299/htdocs/moodle/course/gradeslib.php:33) in /homepages/30/d94988299/htdocs/moodle/course/grades.php on line 285
Given name Surname Shelf: Scientific Method - Student Student 99 85 0 0 0 0 0 0 0 0 I commented out all the "error" lines in "grades.php"

I commented out all the "error" lines in "grades.php"

Now when I click "Download in Execel" only the jibberish remains and when I click on "Download in Text" only the data (with no delimiters) remain.

QUESTIONS

1.  Is there suppose to be some connection between the "GradeBook" and "Shelf" module?

2.  Is the display on the screen suppose to be downloaded or should a download window open with the option to open or save the data with either button?

3.  How to get rid of the "jibberish" which appears after the "Download in Execel" button is pushed?

4.  Is there a way to upload grades to the "GradeBook"?

5.  How to remove the "Error" message on the "Administration" Page?

6.  Does anyone know the list of the mathematical operators which can be used in the module to indicate -- add, subtract, multiply and divide.

WP1

In reply to W Page

Re: Calculated columns in gradebook

by W Page -

Hi!

In a recent communique from Bruno he very kindly pointed out there was a "HELP" button on the "Calulated Column" GradeBook page which answered the question I posted about the mathematical operators which could be used with the "Calulated Column" GradeBook.

I say he was kind in pointing it out to me because it was right in front of me Calculated columns  and I should have seen it.  He did not tell me to RTFM.

Anyway for those of you who are like me and need things on paper.  I have converted this help information into  "*.DOC" and "*.PDF" documents.  They are attached to this post as a ZIP file.

In reply to W Page

Re: Calculated columns in gradebook

by Marc Dastous -

Did you ever resolve this issue?  It doesn't seem to affect anything, but it is annoying.  I'd just like to know how to get rid of the Error.

Marc

In reply to Marc Dastous

Re: Calculated columns in gradebook

by W Page -

Hi!

No I never got rid of it.  Actually, I thought I was the only person to have the problem occur.  Gustav has begun another thread on the Calculated Columns,
Gradebook with calculated columns in Moodle 1.3?
http://moodle.org/mod/forum/discuss.php?d=6434

I suggest you post your question there so he will know that other folk also got that "Error".  I agree it does not appear to affect the function that much.

He has done some things to improve the code as well.

WP1