最后,你还得保证你用Macromedia Flash做的Flash文件与Moodle可以交互,即需要将下列的代码复制到Flash活动的第一个Frame中。
Score=YourScoreVariable;
Answer=YourAnswerVariable;
StratTime=getTimer();
_root.finishButton.onRelease = function() {
endTime = getTimer() - startTime; moodleService.send_response(answers, endTime, score); moodleService.cleanUp();
// goes to results page }
moodleService.init();
关于这个小程序的说明:变量Score是你在Flash中给出的统计学生最后得分的变量,变量Answer的意义是相同的。结束按钮(FinishButton)是用来将学生做的活动送给Moodle处理,然后取回相应的结果。
最后提醒一个各位:Moodle现在对Flash版本的支持只到7,即用Flash8开发的Flash活动Moodle暂且还不支持。