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

core_table\dynamic API improvements

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-68454-master
    • 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.

      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.

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

            dobedobedoh Andrew Lyons
            mudrd8mz David Mudrák (@mudrd8mz)
            Simey Lameze Simey Lameze
            Adrian Greeve Adrian Greeve
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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