TireSwingSoftware / openassign-server

OpenAssign server intended for use by a separate client via RPC
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

ExamSessionManager.create() cannot return next question pool #88

Open mhrivnak opened 12 years ago

mhrivnak commented 12 years ago

both create() and resume() are not capable of returning only the next question pool with unanswered questions, but this is the most desirable behavior. I propose that if fetch_all == False, we then return the next question pool only.

Basically, we will always return results from _get_next_questions(), and the passed value of 'include_answered' will be equal to the value of 'fetch_all'.

jc0n commented 12 years ago

Basically, we will always return results from _get_next_questions(), and the passed value of 'include_answered' will be equal to the value of 'fetch_all'.

Are you saying then that fetch_all==False implies that include_answered==False (which is now include_responses to prevent ambiguity) and in the case where it is False, only the next question pool (and its questions) should be returned?

This whole routine might benefit from a makeover as you noted in #86 I believe

mhrivnak commented 12 years ago

I think my quoted assertion is incorrect. I propose this:

Looking at the code, I'm not convinced that fetch_all is doing what is advertised. We should make sure that if fetch_all==True, we get all questions for the whole exam. And if fetch_all==False, only questions for the next incomplete question pool.

This definitely could use a makeover, but I don't think we can invest in that at the moment since this feature is oh-so-close to being done.

jc0n commented 12 years ago

@mhrivnak: Take a look at 42fe761e56cc7f6d0f805bfd271e11c252905ef6 and let me know if that is what you had in mind. If so, I'll update the tests accordingly.

mhrivnak commented 12 years ago

That looks reasonable to me.