Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mhrivnak opened this issue Jan 26, 2012 · 4 comments
Open

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

mhrivnak opened this issue Jan 26, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@mhrivnak
Copy link
Member

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'.

mhrivnak added a commit that referenced this issue Jan 26, 2012
… it to work with the UI in the short term.
@jc0n
Copy link
Member

jc0n commented Mar 2, 2012

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
Copy link
Member Author

mhrivnak commented Mar 2, 2012

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

  • For create(), it will call _get_next_questions(include_responses=False)
  • For resume(), it will take a parameter "include_responses" that will be passed to _get_next_questions()
  • In all cases, as noted in the original issue description, a call to create() or resume() where fetch_all==False will return the results of a call to _get_next_questions().

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.

@ghost ghost assigned jc0n Mar 24, 2012
@jc0n
Copy link
Member

jc0n commented Apr 13, 2012

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

@mhrivnak
Copy link
Member Author

That looks reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants