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

Update table_sql to support dynamic sorting

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67914-master
    • Hide
      Setup
      • You will need a course with some users enrolled.
      Testing.
      1. Log in as admin and go to the course.
      2. Click Participants on the nav drawer.
      3. On the participants table note some table headers are links.
      4. Click on the links (First name, Surname..)
      5. Make sure the participants are sorted and the content is refreshed without reload the page.
      6. Try other columns, click Email address and make sure the participants get sorted and the content is refreshed without reloading.
      Show
      Setup You will need a course with some users enrolled. Testing. Log in as admin and go to the course. Click Participants on the nav drawer. On the participants table note some table headers are links. Click on the links (First name, Surname..) Make sure the participants are sorted and the content is refreshed without reload the page. Try other columns, click Email address and make sure the participants get sorted and the content is refreshed without reloading.
    • 5
    • International 3.9 - Sprint 8

    Description

      This is the first logical step after moving table_sql to have a generic web service.

      This is likely the smallest possible change that we can make

      We will need to:

      1. add new arguments to the web service:
        1. sortby (string) A string describing the name of a sortable column
        2. sortdir (int) The sort direction to use when sorting that column
      2. write a new set of AMD modules to handle capture of the sorting
      3. update our output of the table to instantiate our new JS

      JS

      Root path: lib/table/amd/src
      General structure:

      dynamic.js
      local/dynamic/repository.js
      local/dynamic/selectors.js
      local/dynamic/events.js
      

      Need to create a setup() function which listens on the outer-most element for the table (ideally a new <div> which the table is placed in.
      We can keep any arguments in data-attributes on that div
      We look for any clicks on any of the sort buttons and intercept
      Call the WS and replace the <table> tag with the new one

      Attachments

        Issue Links

          Activity

            People

              lameze Simey Lameze
              dobedobedoh Andrew Lyons
              Andrew Lyons Andrew Lyons
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/Jun/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 3 hours, 42 minutes
                  4d 3h 42m