Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-84353

New web service to fetch TinyMCE configuration

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-84353-main
    • Hide
      1. Log in as admin.
      2. Create a course and take a note of its id.
      3. Create a user and enrol it to the course as student.
      4. Enable mobile web services and create a token for the user.
      5. Enable the TinyMCE Premium plugin and configure a dummy API key.
      6. Run the following command:

        curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=editor_tiny_get_configuration&contextlevel=course&instanceid=<COURSEID>" | python -m json.tool
        

        • Check that the web service returns the configuration of the TinyMCE editor and its subplugins (details are covered by PHPUnit tests).
        • Take a note of the returned context id, it's needed for the next step.
      7. Run the following command:

        curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=tiny_premium_get_api_key&contextid=<CONTEXTID>" | python -m json.tool
        

        • Check that the response contains the dummy TinyMCE API key.
      Show
      Log in as admin. Create a course and take a note of its id. Create a user and enrol it to the course as student. Enable mobile web services and create a token for the user. Enable the TinyMCE Premium plugin and configure a dummy API key. Run the following command: curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=editor_tiny_get_configuration&contextlevel=course&instanceid=<COURSEID>" | python -m json.tool Check that the web service returns the configuration of the TinyMCE editor and its subplugins (details are covered by PHPUnit tests). Take a note of the returned context id, it's needed for the next step. Run the following command: curl --silent "<WWWROOT>/webservice/rest/server.php?moodlewsrestformat=json" --data "wstoken=<TOKEN>&wsfunction=tiny_premium_get_api_key&contextid=<CONTEXTID>" | python -m json.tool Check that the response contains the dummy TinyMCE API key.
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-84353 using repository: https://github.com/albertgasset/moodle.git

      Should these errors be fixed?

      Built on: Mon Mar 17 15:02:27 UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-84353 using repository: https://github.com/albertgasset/moodle.git main (0 errors / 1 warnings) [branch: MDL-84353-main | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: the branch is based off integration.git Should these errors be fixed? Built on: Mon Mar 17 15:02:27 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84353 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18116/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61902/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61903/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61904/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61905/ App tests (stable app version) Built on: Thu Jan 30 12:30:44 UTC 2025
    • Moodle Apps - 2025 i1.1, Moodle Apps Sprint 2025-I1.2

      To implement the TinyMCE in the mobile app we need a new web service to fetch the configuration of the TinyMCE editor and its plugins.

            albert.gasset@moodle.com Albert Gasset
            albert.gasset@moodle.com Albert Gasset
            Juan Leyva Juan Leyva
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 2 hours, 36 minutes
                3d 2h 36m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.