[ARCHIVED] Canvas Data how to Query if a module is published
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is in reference to querying Canvas data with SQL. Where/what field and table contains if a module is published to student view?
When one views a course as student, one can see published modules. I need a count of this.
The following query gives a count of modules that are in the course, published and unpublished.
select count(distinct module_dim.id)
from module_dim
where module_dim.course_id=9999
What and clause do I need to exclude unpublished modules? Would I need to join another table?
I've searched through the schema(https://portal.inshosteddata.com/docs) and cannot find a field that indicates if a module is published or not. Seems like it should be in module_dim but is not.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
module_dim.workflow_state has: unpublished, active, deleted
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.