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

core_table\dynamic API improvements

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9
    • Component/s: Libraries, Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Open a course with lots of users enrolled (a test course is a quick way to generate a lot of users).
        1. Go to Site administration > Make a test course.
        2. For "Size of course" select "S (~10mb; create in ~30 seconds).
        3. Fill out the other required fields and click "create course"
      1. View the participants page
        1. Ensure that the following features work, and do not cause page to be reloaded
          1. Sort by different fields
          2. Filter by first and last initial
          3. Pagination
        2. With each of the above different filters (in step 2.1) open the following dialogues:
          1. The information button (next the the status which is normally green with the text of "Active")
          2. The edit enrolment button (next to the information button).
            1. Change the status to "Suspended"**
          3. Check that the dialogue pops up and that the table updates with no page reload.
      Show
      Open a course with lots of users enrolled (a test course is a quick way to generate a lot of users). Go to Site administration > Make a test course. For "Size of course" select "S (~10mb; create in ~30 seconds). Fill out the other required fields and click "create course" View the participants page Ensure that the following features work, and do not cause page to be reloaded Sort by different fields Filter by first and last initial Pagination With each of the above different filters (in step 2.1) open the following dialogues: The information button (next the the status which is normally green with the text of "Active") The edit enrolment button (next to the information button). Change the status to "Suspended"** Check that the dialogue pops up and that the table updates with no page reload.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68454-master

      Description

      So I was trying to use the new "dynamic" async table_sql in my own project MDL-67748.

      Regardless all the other points mentioned elsewhere related to violating the current naming guidelines for external functions (which I am going to ignore here), I spent a while trying to understand what I need to to make use of this new mechanism.

      At the end of the day (almost literally), I found that it cannot actually work because the current implementation of core_table\external\dynamic::execute() has hard-coded usage of core_user\table\participants_filterset():

      https://github.com/moodle/moodle/blob/788dfb9c7dad27824ee524de5c1cb9e43b31b98a/lib/table/classes/external/dynamic/fetch.php#L176

      So it cannot be used with my own table and my own filterset. I am not sure if this is forgotten relic of a development or what. Also, I can't at the moment imagine what is your plan on how the filterset will be instantiated here.

        Attachments

        1. Screenshot_1.png
          Screenshot_1.png
          208 kB
        2. Screenshot_2.png
          Screenshot_2.png
          166 kB
        3. Screenshot_3.png
          Screenshot_3.png
          98 kB

          Activity

            People

            Assignee:
            dobedobedoh Andrew Nicols
            Reporter:
            mudrd8mz David Mudrák (@mudrd8mz)
            Peer reviewer:
            Simey Lameze
            Integrator:
            Adrian Greeve
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 minutes
                1d 3m