Total Grade Marks for 1.9.5 HELP!!

Total Grade Marks for 1.9.5 HELP!!

by B Beals -
Number of replies: 1
Need help configuring the hack please.

Moodle 1.9.5 (Build: 20090515)
FF3

I've downloaded the lib.php, backed up my original, and then copied the new one into course/lib.php. That alone causes my moodle page to not work when trying to view anything course related. When I navigate to SiteAdmin>Courses>Add/EditCourses I get a totally blank screen (all white). I've been trying to get the code situation straightened out so I've been going through line by line comparing the (we're gonna refer to it as TGMlib for Total Grade Marks lib.php and then Oldlib) tgmlib with the oldlib and trying to figure out where the inconsistencies stem from. So far I've noticed the biggest issue starting on line 786. This is where they start the biggest changes but I can't clean up the code. I'm going to attach the problem file and I put the problem text into this field. You can compare the attached file to a standard /course/lib.php All help is much appreciated!

786: foreach ($courses as $course) {
print_simple_box_start('center', '100%', '', 5, "coursebox");
$linkcss = '';
if (empty($course->visible)) {
$linkcss = 'class="dimmed"';
}
print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
require_once $CFG->dirroot.'/grade/report/overview/lib.php';
$grade_item = grade_item::fetch_course_item($course->id);
$grade = new grade_grade(array('itemid'=>$grade_item->id, 'userid'=>$USER->id));
$grade->grade_item =& $grade_item;
$display_final_grade = grade_format_gradevalue($grade->finalgrade, $grade_item, true);
if ($display_final_grade>0) {
$display_final_grade = ' - '.$display_final_grade;
print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>'.$display_final_grade);
} else {
print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
}
print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
if (array_key_exists($course->id,$htmlarray)) {
foreach ($htmlarray[$course->id] as $modname => $html) {
echo $html;
}
}
print_simple_box_end();
}
}