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

Adding new Coursework activity causes warning on 3.7 if "User to receive submission notification" box has no selection #18

Open
lexxkoto opened this issue Jul 2, 2019 · 0 comments

Comments

@lexxkoto
Copy link

lexxkoto commented Jul 2, 2019

Hello,

Plugin works fine in Moodle 3.5, but in 3.7 it throws a warning when a new activity is created - but only if the 'User to receive submission notification' box doesn't have a selection.

This results in an empty array being passed through to add_moduleinfo() and is tripping up emulate_bound_params().

`

( ! ) Warning: mysqli::real_escape_string() expects parameter 1 to be string, array given in /var/www/moodle37/lib/dml/mysqli_native_moodle_database.php on line 1112

1 | 0.0000 | 383248 | {main}( ) | .../modedit.php:0
2 | 0.2373 | 9139248 | add_moduleinfo( ) | .../modedit.php:155
3 | 0.2393 | 9177640 | coursework_add_instance( ) | .../modlib.php:122
4 | 0.2395 | 9183272 | mariadb_native_moodle_database->insert_record( ) | .../lib.php:182
5 | 0.2399 | 9312392 | mariadb_native_moodle_database->insert_record_raw( ) | .../mysqli_native_moodle_database.php:1375
6 | 0.2400 | 9315104 | mariadb_native_moodle_database->emulate_bound_params( ) | .../mysqli_native_moodle_database.php:1324
7 | 0.2401 | 9317744 | real_escape_string ( ) | .../mysqli_native_moodle_database.php:1112

`

agwells pushed a commit to catalyst/open-mod_coursework that referenced this issue Oct 23, 2024
* CTP-3678 coursework_update_grades

* CTP-3678 coursework_get_user_grades PHPDoc
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

No branches or pull requests

1 participant