Closed ndenmeade closed 6 years ago
Thank you for the report. This was fixed in the availability plugin xp
, which I'll post on Moodle.org right after I post this message. The problem originated from the activitynames
filter which attempted to check the availability of an activity restricted by xp
for a non-logged in user.
Thanks – awesome response time :)
From: Frédéric Massart [mailto:notifications@github.com] Sent: Friday, 20 October 2017 11:57 AM To: FMCorz/moodle-block_xp moodle-block_xp@noreply.github.com Cc: NDenmeade natalie@moojoo.com.au; Author author@noreply.github.com Subject: Re: [FMCorz/moodle-block_xp] Error viewing category when using XP block (#80)
Thank you for the report. This was fixed in the availability plugin xp, which I'll post on Moodle.org right after I post this message. The problem originated from the activitynames filter which attempted to check the availability of an activity restricted by xp for a non-logged in user.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FMCorz/moodle-block_xp/issues/80#issuecomment-338148191 , or mute the thread https://github.com/notifications/unsubscribe-auth/AB5-LtEZYG5XxuajHY6xqZvGd1DvrWQZks5suGBYgaJpZM4QAQ8I . https://github.com/notifications/beacon/AB5-LobA-iEQ6DeBEa4Wj_tEmqofqrmCks5suGBYgaJpZM4QAQ8I.gif
I am using XP in courses in Category 3 in Moodle. As a logged in user I have no issues viewing the url: http://learn.culturalinfusion.org.au/course/index.php?categoryid=3
If I try to access this URL when NOT LOGGED IN - an error occurs: `Debug info: SELECT u.id, x.userid, x.xp, u.id AS userid,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance FROM {user} u JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel LEFT JOIN {block_xp} x ON x.userid = u.id AND x.courseid = :courseid WHERE u.id = :userid [array ( 'contextlevel' => 30, 'courseid' => 37, 'userid' => 0, )] Error code: invalidrecordunknown
Stack trace: