Error when trying to load a forum #26

Open
opened 4 months ago by Altons · 4 comments

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)

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)
Owner

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!
Poster

Thanks a lot! Is there a way to know which version is running on the moodle server I use?

Thanks a lot! Is there a way to know which version is running on the moodle server I use?
Owner

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 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.
Owner

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).

  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 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.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: fynngodau/dawdle#26
Loading…
There is no content yet.