Server returned error
The server has returned the following error:
Impossible to find the data record in the external_functions table of the database. (invalidrecord)
I get this error message:
> **Server returned error**
> The server has returned the following error:
>
>Impossible to find the data record in the external_functions table of the database. (invalidrecord)
The message indicates that the API call that dawdle is trying to call was not found on your Moodle instance.
Probably its version is below 3.7. Some older API calls had been deprecated and were consequently removed in 4.0; for this reason I already switched to the newer API calls that are only available from 3.7.
I've added more graceful handling for this case (for all modules – browser is then opened), as well as a menu that indicates compatibility. I've attached a screenshot so you can have a look!
The message indicates that the API call that dawdle is trying to call was not found on your Moodle instance.
Probably its version is below 3.7. Some older API calls had been deprecated and were consequently removed in 4.0; for this reason I already switched to the newer API calls that are only available from 3.7.
I've added more graceful handling for this case (for all modules – browser is then opened), as well as a menu that indicates compatibility. I've attached a screenshot so you can have a look!
I had tried to find out, but there seems to be no good way, besides manually querying an authenticated API (if you are interested, I've added the appropriate actions below).
I considered that I might want to add the Moodle server's version to the app as well but I'm not sure about the presentation, as I would want to see whether there is some other information about the instance that could be displayed as well, while I'm also not sure where.
Paths in the instructions are to be understood as relative paths.
Go to /admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345, open your developer tools with F12 to see where your browser is redirecting you (it may not display in the URL bar). Authenticate. The Location header of the final query, which will be 302 Found, will look like this:
moodlemobile://token=…
Copy the token.
base64 -d, then enter the token. If you don't have such a command on your system, you may use an online decoder.
The output will be two or three strings separated by :::. Copy the second one. This is your final webservice authentication token.
Go to /webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=…. Look for the key release.
Command line alternative: curl "…/webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=… | jq .release
This is your Moodle version.
I had tried to find out, but there seems to be no good way, besides manually querying an authenticated API (if you are interested, I've added the appropriate actions below).
I considered that I might want to add the Moodle server's version to the app as well but I'm not sure about the presentation, as I would want to see whether there is some other information about the instance that could be displayed as well, while I'm also not sure where.
---
Paths in the instructions are to be understood as relative paths.
1. Go to `/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345`, open your developer tools with F12 to see where your browser is redirecting you (it may not display in the URL bar). Authenticate. The `Location` header of the final query, which will be `302 Found`, will look like this:
`moodlemobile://token=…`
Copy the token.
2. `base64 -d`, then enter the token. If you don't have such a command on your system, you may use an online decoder.
3. The output will be two or three strings separated by `:::`. Copy the **second** one. This is your final webservice authentication token.
4. Go to `/webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=…`. Look for the key `release`.
Command line alternative: `curl "…/webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=… | jq .release`
This is your Moodle version.
I found a new way to do it in the browser, provided that calendars are enabled on your Moodle instance. The idea is to click on a link to the Moodle docs, and then the docs for the correct version are opened automatically (similar to the description in the docs).
Log in to your instance.
Head to /calendar/export.php.
Click "How do I subscribe to this calendar from a calendar application (Google/Outlook/Other)?"
At the top of the page, spot the "book" icon next to which it will say "X.Y docs".
X.Y is your Moodle version.
I found a new way to do it in the browser, provided that calendars are enabled on your Moodle instance. The idea is to click on a link to the Moodle docs, and then the docs for the correct version are opened automatically (similar to the description [in the docs](https://docs.moodle.org/400/en/Moodle_version#Finding_the_version_of_Moodle_if_you_are_not_an_admin)).
1. Log in to your instance.
2. Head to `/calendar/export.php`.
3. Click "How do I subscribe to this calendar from a calendar application (Google/Outlook/Other)?"
4. At the top of the page, spot the "book" icon next to which it will say "X.Y docs".
X.Y is your Moodle version.
I get this error message:
The message indicates that the API call that dawdle is trying to call was not found on your Moodle instance.
Probably its version is below 3.7. Some older API calls had been deprecated and were consequently removed in 4.0; for this reason I already switched to the newer API calls that are only available from 3.7.
I've added more graceful handling for this case (for all modules – browser is then opened), as well as a menu that indicates compatibility. I've attached a screenshot so you can have a look!
Thanks a lot! Is there a way to know which version is running on the moodle server I use?
I had tried to find out, but there seems to be no good way, besides manually querying an authenticated API (if you are interested, I've added the appropriate actions below).
I considered that I might want to add the Moodle server's version to the app as well but I'm not sure about the presentation, as I would want to see whether there is some other information about the instance that could be displayed as well, while I'm also not sure where.
Paths in the instructions are to be understood as relative paths.
Go to
/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345
, open your developer tools with F12 to see where your browser is redirecting you (it may not display in the URL bar). Authenticate. TheLocation
header of the final query, which will be302 Found
, will look like this:moodlemobile://token=…
Copy the token.
base64 -d
, then enter the token. If you don't have such a command on your system, you may use an online decoder.The output will be two or three strings separated by
:::
. Copy the second one. This is your final webservice authentication token.Go to
/webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=…
. Look for the keyrelease
.Command line alternative:
curl "…/webservice/rest/server.php?wsfunction=core_webservice_get_site_info&moodlewsrestformat=json&wstoken=… | jq .release
This is your Moodle version.
I found a new way to do it in the browser, provided that calendars are enabled on your Moodle instance. The idea is to click on a link to the Moodle docs, and then the docs for the correct version are opened automatically (similar to the description in the docs).
/calendar/export.php
.X.Y is your Moodle version.