shijin k
shijin k

Reputation: 1

How to display and return moodle course lesson content through moodle API?

I am trying to make custom app using the Moodle API.

How can I display and return courses of type lesson?

In my lesson, there is a choice type questions in between the lesson pages. The Moodle API (mod_lesson_get_page_data) returns the page content on two object properties viz, lesson_page_data->page->contents and lesson_page_data->pagecontent. The later contains HTML with buttons to submit the question, but when I click, the form is directed to the Moodle site and is asking to login. Instead I am looking for a solution to solve it in mobile itself without redirecting to site.

Upvotes: 0

Views: 409

Answers (1)

Evgeniy Voevodin
Evgeniy Voevodin

Reputation: 241

There are currently no (and probably never will be) methods to return whole offline lesson. You should use scorm for that task. However, why don't you replace all links in html with your own and write a small script that simply gets all parameters, creates and executes curl request and returns html?

Upvotes: 0

Related Questions