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

Clean up the grade book web service file naming

    XMLWordPrintable

    Details

    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w12_MDL-44603_m27_extgrade2

      Description

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

      Follow up from MDL-30085

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              poltawski Dan Poltawski
              Peer reviewer:
              Eloy Lafuente (stronk7)
              Integrator:
              Marina Glancy
              Tester:
              Dan Poltawski
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14