Skip to content

Commit

Permalink
MDL-31683 mod_assign: Fixed up whitespace and cap check changes as re…
Browse files Browse the repository at this point in the history
…quired
  • Loading branch information
Sam Hemelryk committed Oct 17, 2012
1 parent 7e5c720 commit 2ea4312
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
20 changes: 8 additions & 12 deletions mod/assign/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static function get_grades_returns() {

/**
* Returns description of method parameters
*
*
* @return external_function_parameters
* @since Moodle 2.4
*/
Expand All @@ -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.
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand All @@ -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(
Expand All @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions mod/scorm/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 2ea4312

Please sign in to comment.