ULCC/moodle-block_ilp — pull request #2 by jamesballard (2013-09-26 10:20:54+00:00)
Title: Missing param error when deep linking

If one wishes to deep link to the ILP page, for example from a portal, this causes a missing parameter error. Changing the user_id required_param to an optional_param removes this and the global USER can then be used to return one's own ILP if no user_id is passed.

The code approach used is taken from user profile but one could seemingly get the same effect with the more terse:

$user_id = $PARSER->optional_param('user_id', $USER->id, PARAM_INT);