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

Failed to run tests #185

Open
ZSThai opened this issue Dec 29, 2023 · 3 comments
Open

Failed to run tests #185

ZSThai opened this issue Dec 29, 2023 · 3 comments

Comments

@ZSThai
Copy link

ZSThai commented Dec 29, 2023

I installed CodeRunner and jobeinabox but when I tried it I got this error message "Jobe server request failed. HTTP response from Jobe was -1: ""The URL is blocked.""". The server has its firewall turned off. I tried using the default Jobe server and the test was successful. Can you tell me what the error is and how to solve it?

@trampgeek
Copy link
Owner

Check the cURL blocked hosts list and cURL allowed ports list fields in Moodle's Site administration > General > HTTP security. Clear both of those for a start to see if that solves the problem. If so, reset to the defaults and remove just the ones that are causing problems.

If you find you need to clear both of those fields, you probably have an invalid domain name for the jobe server, e.g. one with underscores in it. This can occur when using a containerised set up since Docker service names don't have to conform to URL syntax rules.

@ZSThai
Copy link
Author

ZSThai commented Jan 2, 2024

Sorry for the late response. Thank you, you are right, I forgot to add the port of Jobe server and "cURL allowed ports list".

But I have a problem when using the "Json_decode filter", the error appears as shown in the picture.
image
I also saw the exchange between you and Khang N. Pham on the forum about this issue. https://coderunner.org.nz/mod/forum/discuss.php?d=448
But I still can't find a solution to solve the error I'm having. Can you give me some advice or documentation about this issue?

@trampgeek
Copy link
Owner

trampgeek commented Jan 2, 2024

Twig does not have a json_decode filter. Khang N. Pham apparently implemented his own, but it's not part of the standard CodeRunner release.

The available Twig filters are documented here: https://twig.symfony.com/doc/3.x/filters/index.html

There are also a few extra ones that CodeRunner has added, documented here: https://github.com/trampgeek/moodle-qtype_coderunner/blob/master/Readme.md#twig-escapers

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