Get HTML body content from ModuleItem type Page when Pages disabled

Jump to solution
quantumblink
Community Explorer

Hello,

 I am developing an iOS client for Canvas written in Swift.
I noticed that a ModuleItem object does not include the body property compared to other similar objects like Assignments, Page, etc. I thought to try linking a Page object to the ModuleItem based on their IDs on runtime, but in my testing I ran across a situation where the instructor of a course can disable Pages for their course.

What should the approach be for getting body content of a ModuleItem of type "Page" when the Pages endpoint is unavailable?

 

 

Labels (6)
0 Likes
1 Solution
quantumblink
Community Explorer
Author

I did some further review of the data returned by the ModuleItem and it looks like I should be able to retrieve page info directly from the endpoint given the "page_url" param. I'll just need to do some string modification to grab that data.

View solution in original post