To display QuizPort grades on a Moodle 1.9 (or earlier) course page, you need one extra file, "courselinks.js.php", which I will send to all the people who have bought a single or institutional license for QuizPort.
- put the "courselink.js.php" file into the "mod/quizport" folder on your server
- login to Moodle as course teacher or admin
- go to your Moodle profile page then ...
- click "Show advanced"
- set "When editing text" to "Use standard Web forms"
- click "Save changes" at t he bottom of the page
- go to the course where you want to show QuizPort grades on the course page
- switch course page into edit mode
- click the edit icon for the very top section (=topic or week) of the course
- insert the following javascript code:
<script type="text/javascript">
//<![CDATA[
var src = location.href.replace(new RegExp('^(.*?)/course/view.php.*$'), '$1');
src += '/mod/quizport/courselinks.js.php?id=';
src += location.href.replace(new RegExp('^.*?id=([0-9]+).*$'), '$1');
src += '&rnd='+Math.ceil(10000*Math.random())+'&showgrades=1';
document.writeln('<scr'+'ipt type="text/javascr'+'ipt" src="'+src+'"></scr'+'ipt>');
//]]>
</script> - click "Save changes" at the bottom of the page
That's it! Next time you view the course page, the QuizPorts will display their color coded grades.
Be careful not to edit the summary for the top section of your course with the Moodle editor or it will mess up the javascript.
Be aware that showing grades on the course page requires some extra database queries each and every time the course page is displayed, and there is some delay (usually less than a second) in the student's browser between the page loading and the grades appearing.
I will send you the courselinks.js.php file in the near future.
best regards
Gordon