MDL-55720 course: fix potential undefined variable and cleaning
commit7c890919957fdf4da1967d0055394d323ae1ec06
authorak4t0sh <ak4t0sh@free.fr>
Wed, 2 Nov 2016 22:15:45 +0000 (2 23:15 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 13 Dec 2016 10:49:32 +0000 (13 11:49 +0100)
treeb033d458d54b6234ccf58048155121aa29cc8523
parent75efa0860cb92dd67bd147a5c9138a9de9f8d32d
MDL-55720 course: fix potential undefined variable and cleaning

This commit replace $e usage by $returnfromfunc.
Indeed $returnfromfunc always exists in the scope and take $e value in case of moodle_exception.

This commit also remove useless $modcontext affectation.
course/modlib.php