Connection between assignment and quiz module

Connection between assignment and quiz module

by Karl-Heinz K -
Number of replies: 0
hello everybody,

I need some help with the following problem:

Currently I modify the audiorecording module to include video recording. This works fine already.
Now I would like to add a like form the recorded video to a quiz module. The reason for this is, that I want to use the quiz module for a standardized evaluation of the recoreded video stream.

In details I would like to include in audiorecording/assignment.class.php file a "function setup_elements() {}" which displays during the setup of the audiorecording assignment a table of all available quizes like produced by : /mod/quiz/index.php

I would like to select a quiz, get the id of this quiz and write this value into var1 or var2 or var3 or ... in the assigment module.

This information in varX should be used in the audiorecording file play to add in addition to the download link an other link directly pointing to the evaluation quiz. I would thus be possible to see the video again and again and fill out the quiz with the evaluation questions.
The link should look like: /mod/quiz/view.php?id=xy (xy = number)

I have no idea how to get access to the id of the indiviual quiz. I mean I do not know how to access it with the moodle api. In the mysql database the information I am looking for is contained in mdl_course_modules table. Here the columns id, course and module would be fine to get the information I need. I tried to get the info with get_record but I could not figure out how to get a single element of the returned row-object.

I fight also with the $mform argument of the function setup_elements (for the beginning I could just enter manually the course id and the id of the quiz instance I need ... but this is no fun too for me with $mform.

Actually I am a dentist and would like to focus on the course content. Therefore a not tooooooo professional-like answer would be just perfect for me. I mastered in the meantime quite some php, actionscript and javascript problems, but with the given moodle documentation (is there any?) and the for a php beginner highly complex object oriented approach it was very frustating for me so far when I tried to solve the problem on my own.

Thanks a lot to everybody who contributes to the solution.

Sincerely

Karl-Heinz

Average of ratings: -