Commit f4418aef authored by Francois Gannaz's avatar Francois Gannaz
Browse files

code cleanup

parent 77f7c10d
......@@ -33,15 +33,6 @@ class institution extends moodlefetcher
} catch (\Exception $e) {
$error = $this->fetcher->getLastError();
return (isset($error->code) ? (int) $error->code : 0);
/*
if ($error->code === self::ERROR_LOGIN_UNKNOWN) {
// TODO
} else if ($error->code === self::ERROR_TOKEN_NOTVALID) {
// TODO
} else {
// TODO
}
*/
}
return self::OK;
}
......@@ -51,17 +42,9 @@ class institution extends moodlefetcher
$this->fetch("PUT", "/v1/user/create", ['data' => $user]);
} catch (\Exception $e) {
$error = $this->fetcher->getLastError();
if ($error->code === self::ERROR_CREATION_FAILED) {
// TODO
} else if ($error->code === self::ERROR_TOKEN_NOTVALID) {
// TODO
} else {
// TODO
}
return $error->code;
return (isset($error->code) ? (int) $error->code : 0);
}
// creation successful
// TODO
return self::OK;
}
......
......@@ -52,6 +52,10 @@ $event->add_record_snapshot(LABNBOOK_TABLE, $moduleinstance);
$event->trigger();
*/
/*
* @todo call API /v1/mission/grant so that the teacher has access to all the missions and classes used in this course
*/
/* @var $PAGE moodle_page */
$PAGE->set_url('/mod/labnbook/view.php', ['id' => $cm->id]);
$PAGE->set_title(format_string($moduleinstance->name));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment