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

Full web service documentation should be a lot easier to access for admin

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      • Go to Admin block > Plugins > Web service
        You should see a Documentation page.
      • Go to Admin block > plugins > Web service > Manage service. Create a service, you should arrive to a page to add some functions. The function list of the documentation should contain all functions listed in this page.
      Show
      Go to Admin block > Plugins > Web service You should see a Documentation page. Go to Admin block > plugins > Web service > Manage service. Create a service, you should arrive to a page to add some functions. The function list of the documentation should contain all functions listed in this page.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-MDL-28650

      Description

      For admin creates a button that displays a full web service documentation. It is a big request of everybody. At the moment the only way to get a full documentation is:

      1- login as admin
      2- enable ws documentation into Web service > Manage Protocol
      3- create a service and add all functions to it
      4- give create_token capability to a none admin user
      5- login as this user
      6- access your Security Keys page and click on the documentation

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            jerome Jérôme Mouneyrac added a comment -

            I'm preparing a patch for it, so it would be quicker for the next sprint.

            Show
            jerome Jérôme Mouneyrac added a comment - I'm preparing a patch for it, so it would be quicker for the next sprint.
            Hide
            jerome Jérôme Mouneyrac added a comment -

            I added a link to the full api into Web service > Manage Services.
            None admin users should still be able to see their own documentation in their security page.

            Show
            jerome Jérôme Mouneyrac added a comment - I added a link to the full api into Web service > Manage Services. None admin users should still be able to see their own documentation in their security page.
            Hide
            jerome Jérôme Mouneyrac added a comment -

            It needs to be backported to 2.0

            Show
            jerome Jérôme Mouneyrac added a comment - It needs to be backported to 2.0
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Added MOODLE_20_STABLE modification

            Show
            jerome Jérôme Mouneyrac added a comment - Added MOODLE_20_STABLE modification
            Hide
            dongsheng Dongsheng Cai added a comment -

            Peer reviewed.

            Note: needs to add 2.1 branch

            Show
            dongsheng Dongsheng Cai added a comment - Peer reviewed. Note: needs to add 2.1 branch
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Added 2.1 stable version

            Show
            jerome Jérôme Mouneyrac added a comment - Added 2.1 stable version
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Ok ready for integration. The full API documentation is now an admin page. Cleaner code, easier to find and more secure.

            Show
            jerome Jérôme Mouneyrac added a comment - Ok ready for integration. The full API documentation is now an admin page. Cleaner code, easier to find and more secure.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Offtopic: What a branch name for master is that, lol (MDL-MDL-28650) :-P

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Offtopic: What a branch name for master is that, lol (MDL- MDL-28650 ) :-P
            Hide
            jerome Jérôme Mouneyrac added a comment -

            It's art you can't understand :-p

            Show
            jerome Jérôme Mouneyrac added a comment - It's art you can't understand :-p
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            3 minor points:

            1) being an improvement... does this need to be backported to 20_STABLE too?
            2) testing instructions, plz (I know they are trivial, but)
            3) Just saw some whitespace in the patch

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - 3 minor points: 1) being an improvement... does this need to be backported to 20_STABLE too? 2) testing instructions, plz (I know they are trivial, but) 3) Just saw some whitespace in the patch Ciao
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Hi Eloy,
            1) yes it was requested by Martin.
            2) I added it.
            3) It's probably only in 2.0? I had to resolve conflicts during cherry pick and I totaly forgot the whitespaces after resolving the conflicts. I always check the whitespace before commit, I know it's a pain for integration. Thanks for telling me anyway, it will make me look even more next time

            Show
            jerome Jérôme Mouneyrac added a comment - Hi Eloy, 1) yes it was requested by Martin. 2) I added it. 3) It's probably only in 2.0? I had to resolve conflicts during cherry pick and I totaly forgot the whitespaces after resolving the conflicts. I always check the whitespace before commit, I know it's a pain for integration. Thanks for telling me anyway, it will make me look even more next time
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Ho Jerome, regarding whitespace @ MDL-28650, seems to be in all branches, in admin/webservice/documentation.php (new file):

            +echo $renderer->documentation_html($functiondescs,[HERE!]

            do you amend it or do I add extra commit?

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Ho Jerome, regarding whitespace @ MDL-28650 , seems to be in all branches, in admin/webservice/documentation.php (new file): +echo $renderer->documentation_html($functiondescs, [HERE!] do you amend it or do I add extra commit?
            Hide
            jerome Jérôme Mouneyrac added a comment -

            I can amend it, at worth it will go to the next integration.

            Show
            jerome Jérôme Mouneyrac added a comment - I can amend it, at worth it will go to the next integration.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            So finally rejecting this:

            1) Incorrect whitespace as stated above
            2) Copyright 2009 in new file
            3) Changing existing strings in stable branches adding params to it
            4) Wrong use of $_REQUEST, not cleaned at all. Use optional_param() instead.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - So finally rejecting this: 1) Incorrect whitespace as stated above 2) Copyright 2009 in new file 3) Changing existing strings in stable branches adding params to it 4) Wrong use of $_REQUEST, not cleaned at all. Use optional_param() instead. Ciao
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Thanks Eloy for reviewing. I'm submitting for integration, I fixed the mentionned points, I also rebased.

            Show
            jerome Jérôme Mouneyrac added a comment - Thanks Eloy for reviewing. I'm submitting for integration, I fixed the mentionned points, I also rebased.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Tested under 21_STABLE:

            • New option available in admin tree, shows all the documentation.
            • User, via his "manage tokens" page can view the documentation for the services he has access to. The list of functions available in the service is the list documented, nothing else.

            Passing, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Tested under 21_STABLE: New option available in admin tree, shows all the documentation. User, via his "manage tokens" page can view the documentation for the services he has access to. The list of functions available in the service is the list documented, nothing else. Passing, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Many thanks for the hard work, this has been sent upstream and is available in all the git and cvs repositories.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work, this has been sent upstream and is available in all the git and cvs repositories.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11