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

The enrol_apply plugin is not compatible with the admin_bookmarks block. #84

Open
ewallah opened this issue Oct 21, 2018 · 3 comments
Open

Comments

@ewallah
Copy link

ewallah commented Oct 21, 2018

Running behat testing on the admin_bookmarks block, produces 2 errors related to the enrol_apply plugin:

--- Failed steps:

001 Scenario: Admin page can be accessed through bookmarks block               # blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature:22
      And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" # blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature:25
        Block matching locator "'Admin bookmarks'" not found.

002 Scenario: Admin page can be removed from bookmarks                         # blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature:29
      And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" # blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature:32
        Block matching locator "'Admin bookmarks'" not found.

2 scenarios (2 failed)
19 steps (12 passed, 2 failed, 5 skipped)
0m12.22s (32.61Mb)
To re-run failed processes, you can use following command:
php admin/tool/behat/cli/run.php -vvv --colors --profile="default" --tags="@block_admin_bookmarks" --rerun

The screen output is something like:


The settings shown below were added during your last Moodle upgrade. Make any changes necessary to the defaults and then click the "Save changes" button at the bottom of this page.

New settings - Course enrol confirmation
Confirmation email subject  enrol_apply | confirmmailsubject
Confirmation email content enrol_apply | confirmmailcontent
Waiting list mail subject enrol_apply | waitmailsubject
Waiting list mail content enrol_apply | waitmailcontent
Cancelation email subject enrol_apply | cancelmailsubject
Cancelation email content enrol_apply | cancelmailcontent

So during behat testing of the admin bookmarks block, an admin is redirected to new settings of the enrol_appy plugin.

Perhaps this problem can be related to:
MDL-57659
MDL-12689

@Flottertotte
Copy link
Contributor

Hello, I think the "screen output" is printed because you did not define email contents yet, might this be the case? I feel there is no compatibility issue between the two plugins.

@ewallah
Copy link
Author

ewallah commented May 17, 2021

The admin bookmark blocks is not the only plugin that check for system settings, other plugins can also show the same behavior. And not only during Behat testing, but eventually also during cron functions or installing new plugins.

There is no problem when I install a new plugin and in the new configuration some settings of your plugin show up because they were not filled in. There can be a problem when a cron function tries to access system settings and stops functioning, only because your plugin was not configured completely.

You added the line if ($hassiteconfig) to get rid of the error on the login page. Here it is the same, something is missing to get rid of the error on the admin bookmarks page.

@Flottertotte
Copy link
Contributor

So you mean if you install the plugin and configure it there will be no problem, right?

But in case you only install the plugin (but not configure it) some cron jobs may hang? I never experienced this kind of problem. Could you please tell me an example so that I can reproduce the problem and fix

Btw: below message I saw already often with other plugins (installed but not configured):

The settings shown below were added during your last Moodle upgrade. Make any changes necessary to the defaults and then click the "Save changes" button at the bottom of this page.

Thank you

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

2 participants