Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37673

Re: Submitting a quiz question from a webservice

$
0
0
by Frank van Schie.  

Thanks Tim,

I'd certainly prefer not to fork. The requirements overlap quite heavily with quiz, but do differ in some fields, so it'll probably be a more limited new module heavily based on quiz for the customer.

Anyway, I got my code working a while back. In case anyone comes here via Google: I now use question_engine::load_questions_usage_by_activity($quizattempt->get_uniqueid());

Then I get the question attempt object for the question I'm receiving a submission for, prepare the answer (using the slot instead of the answer ID...) and having the question usage process that data. If all questions are done, I manually process_finish() on the quiz attempt...

Simple once you know how, but rather unintuitive. Where's $question_attempt->submit_answer($answer)?

Regards,

Frank


Viewing all articles
Browse latest Browse all 37673

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>