seb manage_seb_expressionsallowed not found

seb manage_seb_expressionsallowed not found

by ELVIS GATI -
Number of replies: 12

I'm unable to add Quiz activity. This is the error i get upon selecting Quiz

Coding error detected, it must be fixed by a programmer: Capability 'quizaccess/seb:manage_seb_expressionsallowed' was not found! This has to be fixed in code.

Moodle 3.9.2+ (Build: 20200918)

Average of ratings: -
In reply to ELVIS GATI

Re: seb manage_seb_expressionsallowed not found

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
How did you upgrade to 3.9.2+? Did you complete the upgrade correctly? (Try visiting admin notifications page.)
In reply to Tim Hunt

Re: seb manage_seb_expressionsallowed not found

by ELVIS GATI -

Yes I upgraded to 3.9.2+ but that was when I started experiencing that error, I thought it had something to do the current version so I had to upgrade to 3.9.2+.

I did the usual backups i.e moodledata, dB and copied the config file to the current upgrade and went through the upgrade process successfully

In reply to ELVIS GATI

Re: seb manage_seb_expressionsallowed not found

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The thing is, if something like this was broken, it would automatically have been caught by an automated test (e.g. the one that adds a quiz to a course). That would have failed, and so this would never have been released.

Also, the quizaccess/seb:manage_seb_expressionsallowed capability is defined in mod/quiz/accessrule/seb/db/access.php, and has been there since before Moodle 3.9.0. https://github.com/moodle/moodle/blob/MOODLE_39_STABLE/mod/quiz/accessrule/seb/db/access.php#L205

Therefore, the problem is almost certainly something specific to your own install. You need to work out what.
In reply to Tim Hunt

Re: seb manage_seb_expressionsallowed not found

by Sabren Barakat -

I have a special quiz problem in one course only when I log in from the admin account and after clicking on Attempt quiz now this message appears

This page isn’t working med.alexu.edu.eg is currently unable to handle this request.

HTTP ERROR 500

And also when performing a backup, review attempt, or any procedure inside this course

Thanks in advance

In reply to Tim Hunt

Re: seb manage_seb_expressionsallowed not found

by ELVIS GATI -

Very well noted, I will work on that. Thanks 

In reply to ELVIS GATI

Re: seb manage_seb_expressionsallowed not found

by Renzo Uribe -
I am also getting a similar error related to seb after upgrading from 3.8 moodle to 3.9.2+: "Coding error detected, it must be fixed by a programmer: Capability 'quizaccess/seb:manage_seb_filterembeddedcontent' was not found! This has to be fixed in code." Also, I could not find the capability on the capability overview.
There is any workaround or some advice to fix it. I can not use the activity quiz at all.
In reply to Renzo Uribe

Re: seb manage_seb_expressionsallowed not found

by Eduardo Serrano Belenguer -

Hello,

same here, looking for a solution, in my case I am getting:

----------------------------------------

Error detectat. cal que l'arregli un programador: Capability 'quizaccess/seb:manage_seb_enableaudiocontrol' was not found! This has to be fixed in code.

Debug info:
Error code: codingerror

Stack trace:

  • line 824 of /mod/quiz/accessrule/seb/classes/settings_provider.php: coding_exception thrown
  • line 323 of /mod/quiz/accessrule/seb/classes/settings_provider.php: call to quizaccess_seb\settings_provider::can_manage_seb_config_setting()
  • line 356 of /mod/quiz/accessrule/seb/classes/settings_provider.php: call to quizaccess_seb\settings_provider::add_seb_config_elements()
  • line 89 of /mod/quiz/accessrule/seb/rule.php: call to quizaccess_seb\settings_provider::add_seb_settings_fields()
  • line 109 of /mod/quiz/accessmanager.php: call to quizaccess_seb::add_settings_form_fields()
  • line 295 of /mod/quiz/mod_form.php: call to quiz_access_manager::add_settings_form_fields()
  • line 214 of /lib/formslib.php: call to mod_quiz_mod_form->definition()
  • line 130 of /course/moodleform_mod.php: call to moodleform->__construct()
  • line 58 of /mod/quiz/mod_form.php: call to moodleform_mod->__construct()
  • line 141 of /course/modedit.php: call to mod_quiz_mod_form->__construct()
----------------------------------------

on a 3.9.1 (Build: 20200713) installation. Cannot access the quiz activity.

Is there anyway to disable SEB, we are not even using it or intend to use it. I was thinking of disabling it from general quiz settings, but cannot find it, or mayb from the database. Since it is a funcionality that we are not planning to use.

In reply to Eduardo Serrano Belenguer

Re: seb manage_seb_expressionsallowed not found

by Eduardo Serrano Belenguer -
Me, back at it again.
So, first thing first, I don't see myself as a programmer, but looking my way around and following the "stack trace" from bottom to top, I figure that the first steps is building the quiz parameters form with all its fields... so when it gets to loading the SEB fields at:

line 89 of /mod/quiz/accessrule/seb/rule.php: call to quizaccess_seb\settings_provider::add_seb_settings_fields()

I decided to take a look at that in the file: /var/www/html/moodle/mod/quiz/accessrule/seb/rule.php

88: public static function add_settings_form_fields(mod_quiz_mod_form $quizform, MoodleQuickForm $mform) {
89: settings_provider::add_seb_settings_fields($quizform, $mform);
90: }

So I guess that is the function that calls to add the seb settings fields. I decided to comment the line inside the function, resulting in:

88: public static function add_settings_form_fields(mod_quiz_mod_form $quizform, MoodleQuickForm $mform) {
89: /* settings_provider::add_seb_settings_fields($quizform, $mform); */
90: }

Now I don't get any kind of error while trying to edit the parameters of the quiz, new one or existing quiz.

Of course I don't think this is ideal solution, but I just wanted to share, we are not using the SEB functionality, so I guess is fine for the time being. I will look forward to a better solution or maybe in the future when we upgrade our moodle installation. Will see!

Let me know what you think about this, thanks all!
In reply to Eduardo Serrano Belenguer

Re: seb manage_seb_expressionsallowed not found

by Renzo Uribe -

I solved it but you have to add manually in the database, in the tables mdl_capabilities and mdl_role_capabilities. I don't know why during the upgrading the following rows were not added:

on Table mdl_capabilities

729     quizaccess/seb:manage_seb_filterembeddedcontent     write     70     quizaccess_seb     0
730     quizaccess/seb:manage_seb_expressionsallowed     write     70     quizaccess_seb     0
731     quizaccess/seb:manage_seb_expressionsblocked     write     70     quizaccess_seb     0
732     quizaccess/seb:manage_seb_regexallowed     write     70     quizaccess_seb     0
733     quizaccess/seb:manage_seb_regexblocked     write     70     quizaccess_seb     0

on Table mdl_role_capabilities

2243    1    1    quizaccess/seb:manage_seb_filterembeddedcontent    1    1601076777    2
                       
2244    1    3    quizaccess/seb:manage_seb_filterembeddedcontent    1    1601076777    2
                       
2245    1    1    quizaccess/seb:manage_seb_expressionsallowed    1    1601076777    2
                       
2246    1    3    quizaccess/seb:manage_seb_expressionsallowed    1    1601076777    2
                       
2247    1    1    quizaccess/seb:manage_seb_expressionsblocked    1    1601076777    2
                       
2248    1    3    quizaccess/seb:manage_seb_expressionsblocked    1    1601076777    2
                       
2249    1    1    quizaccess/seb:manage_seb_regexallowed    1    1601076778    2
                       
2250    1    3    quizaccess/seb:manage_seb_regexallowed    1    1601076778    2
                       
2251    1    1    quizaccess/seb:manage_seb_regexblocked    1    1601076778    2
                       
2252    1    3    quizaccess/seb:manage_seb_regexblocked    1    1601076778    2

Hope this help you.
Average of ratings: Useful (3)
In reply to Renzo Uribe

Re: seb manage_seb_expressionsallowed not found

by Eduardo Serrano Belenguer -

Looks promising, thanks Renzo!

What I think I am going to do is install in a different server with a new clean moodle and compare the databases, I'll then follow your advice and add those rows, then I will edit again the file I touched and let it be the way it should, see it everything goes fine.

I'll let you know.

Our instance of moodle comes from a 1.9 that was once upgraded to a 2.9 and this summer upgraded to a 3.9... always following the steps and we are really happy with it!

Very nice job the developers and the community!

In reply to Eduardo Serrano Belenguer

Re: seb manage_seb_expressionsallowed not found

by Argun T -

Hello,

First of all I would like to thank Renzo for pointing us to the right direction.

What I did was to get the list of capabilities from https://docs.moodle.org/39/en/Category:Capabilities and add the missing data directly to the database. I inserted the missing data one by one and every time, I had to purge all caches to see the the correct error.

Our instance was upgraded from 3.6 without any errors. 

The missing entries from mdl_capabilities were:

AutoIncrement quizaccess/seb:manage_seb_enableaudiocontrol write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_muteonstartup write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_allowspellchecking write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_activateurlfiltering write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_filterembeddedcontent write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_expressionsallowed write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_expressionsblocked write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_regexallowed write 70 quizaccess_seb 0
AutoIncrement quizaccess/seb:manage_seb_regexblocked write 70 quizaccess_seb 0


The missing entries from mdl_role_capabilities were:

AutoIncrement 1 1 quizaccess/seb:manage_seb_enableaudiocontrol 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_enableaudiocontrol 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_muteonstartup 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_muteonstartup 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_allowspellchecking 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_allowspellchecking 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_activateurlfiltering 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_activateurlfiltering 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_filterembeddedcontent 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_filterembeddedcontent 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_expressionsallowed 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_expressionsallowed 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_expressionsblocked 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_expressionsblocked 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_regexallowed 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_regexallowed 1 1602965692 0
AutoIncrement 1 1 quizaccess/seb:manage_seb_regexblocked 1 1602965692 0
AutoIncrement 1 3 quizaccess/seb:manage_seb_regexblocked 1 1602965692 0



I hope this helps...