Flos Posted May 26, 2011 Posted May 26, 2011 Hi all! I only registered here a couple of days ago, after using the help on this forum silently for a while . I'm fairly new to Moodle, and to php, which is of course the ideal combination for some foolish bravery. The project that I'm working on does language teaching in a hospital environment, and to cut the story short, our trainers need an adaptive test to check new students' language level. I knew about the 'random question type' in Moodle, and figured it shouldn't be hard to condition the rendering of questions in that qtype so it could become an adaptive qtype. So, this is what I want the qtype to do: Given that I have a category in the question bank with 3 subcategories, named "1", "2", and "3": The first questions should be rendered from subcat 1. If the student answers correctly, the questionid is stored in an array ($arrgood). If the student's answer is wrong, the questionid is stored in another array ($arrbad). If $arrgood has 3, or a multiplication of 3, entries, the next question is rendered from the subcategory one higher than the current one. Similarly, if $arrbad has 3, or a multiplication of 3, entries, the next question is rendered from the subcategory one lower than the current one. In all other cases, questions from the same subcategory are rendered. Unfortunately, I'm stuck already in the get_usable_questions function (I am altering the random qtype), where I want to select the appropriate subcategory. I added my questiontype.php (as a txtfile) to this thread, so if anyone would want to take a look at it, and give me some hints, I would be very grateful. Of course, you'll need to forgive me my noobishness as well Thanks in advance! Fleurquestiontype.txt
secretlife Posted May 27, 2011 Posted May 27, 2011 Hi there and welcome. Sorry I am not a coder so I can't help with your question but have you asked (and apologies if you have) on the quiz forum of Moodle.org: open-source community-based tools for learning It is here Quiz module The main quiz man , Tim Hunt, is on there even more often than I am and so with luck you should get some pointers.
Flos Posted May 27, 2011 Author Posted May 27, 2011 Hi there, and thanks for your reply! I will try immediately and post my question there as well, see where we get.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now