Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Updating scorm module activity fields

$
0
0

by Andrew Blum.  

Greetings.


First time post.  Thanks for allowing me to join the community.


I'm new to Moodle and the Web Services API.  I'm trying to automate course creation for a team of content developers.

My logic for doing this is:


1.) clone an existing template course using core_course_duplicate_course while setting fullname, shortname, and categoryid for the new course

2.) update course details (like summary) for the new course

3.) update scorm activity details (like name and url) for the new course


I'm successful with the first two steps, but I can't find a webservices function to use that can update the values in the module list.

Specifically, I want to update the values for "name" and "url" in this response from core_course_get_contents

[
    {
        "id": 4478,
        "name": " 0",
        "visible": 1,
        "summary": "",
        "summaryformat": 1,
        "modules": [
            {
                "id": 2195,
                "url": "https://localhost/mod/scorm/view.php?id=2195",
                "name": "Migration from Bare Metal to virtual machine",
                "instance": 650,
                "visible": 1,
                "modicon": "https://localhost/theme/image.php/client1/scorm/1485892125/icon",
                "modname": "scorm",
                "modplural": "SCORM packages",
                "availability": null,
                "indent": 0
            }
        ]
    }
]


Any pointers ?


Thanks !


Andrew Blum


Viewing all articles
Browse latest Browse all 2361

Trending Articles