-
Notifications
You must be signed in to change notification settings - Fork 5
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
Spell checker invalidunknown. #40
Comments
Thanks for the feedback. Could you please provide the debug output? If it's not shown in the frontend it should be logged into the browser console if debug mode is enabled. |
Will check (just looking into what code is called) |
I had debug set to none, I have now set it to developer... (was running the code in preview mode...) File: /lib/dml/moodle_database.php
|
I will now test it as part of a quiz |
So it only happens in teacher preview question mode? Will try to have a look soon. |
I can understand where this error comes from, unfortunately, i cannot reproduce. When trying to do the preview from the question bank, there is no "edit spellcheck" button, because there's no capability set on this context I believe. Could you please provide exact steps what I need to do? I tested with latest moodle main and latest version of By the way: This branch still has and uses the setting |
On my repo I intend to rename main as classic and rename 405_core_ai as main (if I can work out how to get git to do that). I was looking into the spell checker in the hope that my repo would be the same as yours and the code could converge. I will try to reproduce the steps, and I am wondering if it is something to do with me testing as admin. |
Ah, admin.... Well yes, the link to edit the spellcheck suggestion is hidden behind capabilities. If you're not in a relevant context it won't be shown. I tried to test as admin: I still do not get an error, neither in the preview inside a test nor in a preview in the question bank. But maybe that's a 4.5 issue, because there the question banks have not been migrated yet and probably are in a different context than a course context. |
I am on the branch called forked. |
I tried switching role to teacher.. but it still manifested. |
The line you posted is only accessed when the capabilities are there in the correct context. Regarding the branches: I believe you should have a look at the things I tried to improve regarding the upstream compatibility. Unfortunately, it's already outdated, because we were too slow: mebis-lp/moodle-qtype_aitext#6 |
Where are the permissions checked? I was looking for an easy way to check if the question is in preview mode but I have yet to find it. |
4 lines above actually. Suggestion: You describe me exactly what I need to do to reproduce the issue (Please in a style of "now click this link and then this button ...", I'm still unsure, where exactly you are triggering this issue). I will set up a moodle 4.5 instance (hopefully tomorrow) and rebase the changes I wanted to provide against your You then can re-test and review and I hope I will also find a solution for the context issue. |
aitext_spellcheck.mp4 |
So, I think I finally figured out what was going on and reworked the whole handling of context, I removed the dependency on the course module so that also preview mode should be working fine now. |
I did fresh install of Moodle 4.5, added the mebis version of aitext (at the forked branch). When I tried running the spell checker I got an error message. I was hoping to ensure that my branch works in the same way but I am not quite shure what it should have done. I have attached an image.
The text was updated successfully, but these errors were encountered: