Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

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

code cleanup

parent 77f7c10d
...@@ -33,15 +33,6 @@ class institution extends moodlefetcher ...@@ -33,15 +33,6 @@ class institution extends moodlefetcher
} catch (\Exception $e) { } catch (\Exception $e) {
$error = $this->fetcher->getLastError(); $error = $this->fetcher->getLastError();
return (isset($error->code) ? (int) $error->code : 0); 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; return self::OK;
} }
...@@ -51,17 +42,9 @@ class institution extends moodlefetcher ...@@ -51,17 +42,9 @@ class institution extends moodlefetcher
$this->fetch("PUT", "/v1/user/create", ['data' => $user]); $this->fetch("PUT", "/v1/user/create", ['data' => $user]);
} catch (\Exception $e) { } catch (\Exception $e) {
$error = $this->fetcher->getLastError(); $error = $this->fetcher->getLastError();
if ($error->code === self::ERROR_CREATION_FAILED) { return (isset($error->code) ? (int) $error->code : 0);
// TODO
} else if ($error->code === self::ERROR_TOKEN_NOTVALID) {
// TODO
} else {
// TODO
}
return $error->code;
} }
// creation successful // creation successful
// TODO
return self::OK; return self::OK;
} }
......
...@@ -52,6 +52,10 @@ $event->add_record_snapshot(LABNBOOK_TABLE, $moduleinstance); ...@@ -52,6 +52,10 @@ $event->add_record_snapshot(LABNBOOK_TABLE, $moduleinstance);
$event->trigger(); $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 */ /* @var $PAGE moodle_page */
$PAGE->set_url('/mod/labnbook/view.php', ['id' => $cm->id]); $PAGE->set_url('/mod/labnbook/view.php', ['id' => $cm->id]);
$PAGE->set_title(format_string($moduleinstance->name)); $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