/**
* Returns description of method parameters
- *
+ *
* @return external_function_parameters
* @since Moodle 2.4
*/
/**
* Returns an array of courses the user is enrolled in, and for each course all of the assignments that the user can
* view within that course.
- *
+ *
* @param array $courseids An optional array of course ids. If provided only assignments within the given course
* will be returned. If the user is not enrolled in a given course a warning will be generated and returned.
* @param array $capabilities An array of additional capability checks you wish to be made on the course context.
$context = context_course::instance($id);
try {
self::validate_context($context);
- require_capability('moodle/course:view', $context);
- if (!$course->visible) {
- require_capability('moodle/course:viewhiddencourses', $context);
- }
} catch (Exception $e) {
unset($courses[$id]);
$warnings[] = array(
/**
* Creates an assignment external_single_structure
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
/**
* Creates an assign_plugin_config external_single_structure
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
/**
* Creates a course external_single_structure
- *
+ *
* @return external_single_structure
- * @since Moodle 2.4
+ * @since Moodle 2.4
*/
private static function get_assignments_course_structure() {
return new external_single_structure(
);
}
- /**
+ /**
* Describes the return value for get_assignments
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
}
if (node.title) {
- var el_scorm_api = document.getElementById("external-scormapi");
- el_scorm_api.parentNode.removeChild(el_scorm_api);
+ var el_scorm_api = document.getElementById("external-scormapi");
+ el_scorm_api.parentNode.removeChild(el_scorm_api);
el_scorm_api = document.createElement('script');
el_scorm_api.setAttribute('id','external-scormapi');
el_scorm_api.setAttribute('type','text/javascript');