rigao-alexandre / moodle-quizaccess_failgrade

GNU General Public License v3.0
3 stars 2 forks source link

PHP Notice: Trying to get property 'userid' of non-object #7

Closed leonstr closed 2 years ago

leonstr commented 2 years ago

On Moodle 3.9.10+ (Build: 20210924) with debugging enabled (debug: DEVELOPER, debugdisplay: Yes) when the learner clicks on the quiz activity (mod/quiz/view.php?id=...) with this accessrule enabled the following errors appear at the top of the page:

Notice: Trying to get property 'userid' of non-object in /var/www/moodle/mod/quiz/accessrule/failgrade/rule.php on line 72

Notice: Trying to get property 'userid' of non-object in /var/www/moodle/mod/quiz/accessrule/failgrade/rule.php on line 74

Notice: Trying to get property 'userid' of non-object in /var/www/moodle/mod/quiz/accessrule/failgrade/rule.php on line 72

Notice: Trying to get property 'userid' of non-object in /var/www/moodle/mod/quiz/accessrule/failgrade/rule.php on line 74

leonstr commented 2 years ago

Pull request added: https://github.com/rigao-alexandre/moodle-quizaccess_failgrade/pull/8

rigao-alexandre commented 2 years ago

@leonstr thanks for the contribution!

I just accepted the PR and I intend to release a new version by the end of this week, updating to the new version of Moodle