Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31683 mod_assign: Fixed up whitespace and cap check changes as re…

…quired
  • Loading branch information...
commit 2ea4312a234f01f043764264ccdb37ddf07ee6d1 1 parent 7e5c720
@samhemelryk samhemelryk authored
Showing with 10 additions and 14 deletions.
  1. +8 −12 mod/assign/externallib.php
  2. +2 −2 mod/scorm/module.js
View
20 mod/assign/externallib.php
@@ -191,7 +191,7 @@ public static function get_grades_returns() {
/**
* Returns description of method parameters
- *
+ *
* @return external_function_parameters
* @since Moodle 2.4
*/
@@ -215,7 +215,7 @@ public static function get_assignments_parameters() {
/**
* 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.
@@ -254,10 +254,6 @@ public static function get_assignments($courseids = array(), $capabilities = arr
$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(
@@ -352,7 +348,7 @@ public static function get_assignments($courseids = array(), $capabilities = arr
/**
* Creates an assignment external_single_structure
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
@@ -384,7 +380,7 @@ private static function get_assignments_assignment_structure() {
/**
* Creates an assign_plugin_config external_single_structure
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
@@ -403,9 +399,9 @@ private static function get_assignments_config_structure() {
/**
* 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(
@@ -419,9 +415,9 @@ private static function get_assignments_course_structure() {
);
}
- /**
+ /**
* Describes the return value for get_assignments
- *
+ *
* @return external_single_structure
* @since Moodle 2.4
*/
View
4 mod/scorm/module.js
@@ -88,8 +88,8 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
}
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');
Please sign in to comment.
Something went wrong with that request. Please try again.