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

Clean up the grade book web service file naming

XMLWordPrintable

    • MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • w12_MDL-44603_m27_extgrade2
    • Hide

      1/ test autoloading when executing external function from PHP

      vendor/bin/phpunit --colors core_grading_externallib_testcase
      

      2/ test the core_grading_get_definitions and core_grading_get_gradingform_instances web service functions work:

      In order to test the webservices:

      Use this client: https://gist.github.com/jleyva/9551523

      The curl.php file is here: https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/curl.php

      You need a token related to a service, for get a token you need to create a new service (Plugins / WebServices), add a shortname to that service (in the databasem there is not ui), and add the webservices to be tested to that service

      To get a token:
      yourmoodle.com/login/token.php?service=ServiceShortname&username=XX&password=YYY

      You should get the token using a teacher account or someone to privileges for the module you are going to check

      1 Create a new course
      2 Add a new "Assignment"
      3 In the edit block of the assignment, go to advanced grading and create some rubrics
      4 Edit the client for adding your token, moodle url and parameters (cmid for the first web service)
      5 Run the script, if everything is ok you will get a list of definitions
      Now, as a student you should submit something and as a teacher grade it using the rubrics
      6 Edit the script again, uncomment the last block of code, and for the second webservice as a parameter one of the "ids" of the definitions you get in the previous step
      7 Run the script again the second webservice should return information

      Show
      1/ test autoloading when executing external function from PHP vendor/bin/phpunit --colors core_grading_externallib_testcase 2/ test the core_grading_get_definitions and core_grading_get_gradingform_instances web service functions work: In order to test the webservices: Use this client: https://gist.github.com/jleyva/9551523 The curl.php file is here: https://github.com/moodlehq/sample-ws-clients/blob/master/PHP-REST/curl.php You need a token related to a service, for get a token you need to create a new service (Plugins / WebServices), add a shortname to that service (in the databasem there is not ui), and add the webservices to be tested to that service To get a token: yourmoodle.com/login/token.php?service=ServiceShortname&username=XX&password=YYY You should get the token using a teacher account or someone to privileges for the module you are going to check 1 Create a new course 2 Add a new "Assignment" 3 In the edit block of the assignment, go to advanced grading and create some rubrics 4 Edit the client for adding your token, moodle url and parameters (cmid for the first web service) 5 Run the script, if everything is ok you will get a list of definitions Now, as a student you should submit something and as a teacher grade it using the rubrics 6 Edit the script again, uncomment the last block of code, and for the second webservice as a parameter one of the "ids" of the definitions you get in the previous step 7 Run the script again the second webservice should return information

      They should use the proper frankenstyle locations as defined in core_component::get_component_directory()

      Follow up from MDL-30085

            skodak Petr Skoda
            poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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