Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/#22165 Mumie task not editable after deleting server structure #29

Conversation

fsacha
Copy link
Contributor

@fsacha fsacha commented Mar 9, 2021

No description provided.

lib.php Outdated
@@ -61,6 +61,7 @@ function mumie_add_instance($mumie, $mform) {
* @return int $id id of updated grade item
*/
function mumie_update_instance($mumie, $mform) {
debugging(json_encode($mumie));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you forgot this line ;)

mod_form.php Outdated
if ($completecourse) {
$data->mumie_complete_course = 1;
$server = \auth_mumie\mumie_server::get_by_urlprefix($data->server);
if ($server->get_urlprefix()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super tiny thing you don't have to change:
I usually use get_id() to check if an entry exists. It makes sense to have an object with a name and URL that's not in the database (e.g. when validating, before upsert etc) but there is no situation where a server object would have an id while not also having a DB entry.

@fsacha fsacha merged commit 1d18a30 into dev Mar 9, 2021
@jtgoltz jtgoltz deleted the bug/#22165-mumie-task-not-editable-after-deleting-server-configuration branch August 17, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants