Skip to content

Instantly share code, notes, and snippets.

@cnk
Created January 26, 2016 23:49
Show Gist options
  • Save cnk/c72875c834daacc3639a to your computer and use it in GitHub Desktop.
Save cnk/c72875c834daacc3639a to your computer and use it in GitHub Desktop.
seen = StudentMaterialIndividualization.objects.filter(student=student_id,
material__knowledge_goal=knowledge_goal) \
.order_by('started_at')
for item in seen:
material = MaterialVersion.objects.filter(material_key=item.material_key, version=item.version)
# I am trying to end up with a list of materials so would like to query MaterialVersion but based on restrictions from StudentMaterialIndividualization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment