Creating a course with External tool activity via web services

Creating a course with External tool activity via web services

by Alex V -
Number of replies: 0

Hello,

I'm using v.3.3.5 and want to add the External Resources activity by API function to a course which been created via core_course_create_courses.
But I faced  with 2 issues:
 _________________________________________________________________________________________________________________________________________________________

1
st:
I didn't find suitable API function listed in /admin/webservice/documentation.php to link  External Resources activity tool with existing course.
most of mod_lti_  functions are about creating/updating tool ( which I've already created ) or getting info about already defined LTI. (mod_lti_get_ltis_by_courses)
but nothing  to set up (link) tool to course.


Could you, please, advise, which one to use?
_________________________________________________________________________________________________________________________________________________________

2nd : After the course been successfully created via core_course_create_courses service with user's token ( retrieved from /login/token.php ), 

Appropriate course is not displayed below related user's "My course" section on UI, but it appeared on "Courses" section with missed summary block.


difference between courses created via API and UI

and unavailability to add External Tool Activity to the  course  via UI. 

add activity is missing
   course created via API



add activity exists
   course created via UI


In comparison with another course all parameters returned from core_course_get_courses are pretty the same.

Any suggestions? Maybe some additional actions been missed ?
_________________________________________________________________________________________________________________________________________________________

BTW : I already passed through some of the circles of hell:

  1. Enable web services
  2. Enable rest protocol 
  3. Add a service
  4. Add functions to service
  5. Put all required capabilities to user
Hope the reason not related to the steps above.


Thanks in advance,
Aleksandr Vorobev

Average of ratings: -