Testing a bit with editing course/lib.php version 1.9 and modifying
print_section(I added these lines (new in blue):
1370 $linkcss = $mod->visible ? "" : " class=\"dimmed\" ";
1371 echo '<a '.$linkcss.' '.$extra. // Title unnecessary!
1372 ' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.
1373 '<img src="'.$icon.'" class="activityicon" alt="" /> <span>'.
1374 $instancename.$altname.'</span></a>';
1375
1376 require_once($CFG->libdir.'/gradelib.php');
1377 $grading_info = grade_get_grades($course->id, 'mod', $mod->modname, $mod->instance, $USER->id);
1378 if (isset($grading_info->items[0])) {
1379 $item = $grading_info->items[0];
1380 $grade = $item->grades[$USER->id];
1381 print ' ' . round(100*(($grade->grade-$item->grademin)/($item->grademax-$item->grademin))) . '%';
1382 }
And I now get a percent behind each graded activity.
You could build from there so that a total score is calculated - giving 0 for
each non-graded activity. Extend this to show a progress bar for each section.