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

Refactor to avoid accessing StudentModule models directly #58

Open
pdpinch opened this issue Mar 3, 2015 · 1 comment
Open

Refactor to avoid accessing StudentModule models directly #58

pdpinch opened this issue Mar 3, 2015 · 1 comment
Labels

Comments

@pdpinch
Copy link
Member

pdpinch commented Mar 3, 2015

from #52 (comment)

An XBlock should never directly access StudentModule models directly. Anything you need from the modulestore or form the StudentModule models should be available through XBlock services, or we should create new XBlock Services to safely expose what's needed.

The username should be available now. An XBlock user service was created recently and could be leveraged here. It appears the module state is being retrieved to view student state from one user to another. You can avoid the need for accessing the state directly by adding the annotated_filename to the submission JSON blob as an arbitrary attribute. This will be useful in debugging anyhow, to have all relative information captured in the submissions table.

@pdpinch pdpinch added the P2 label Mar 3, 2015
@pdpinch pdpinch added P1 and removed P2 labels Aug 21, 2015
@pdpinch
Copy link
Member Author

pdpinch commented Aug 24, 2015

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