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

Data attributes are not always being passed to individual tabs

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-73495-master
    • Hide

      1) Apply the MDL-73495-test.patch patch to your site

      2) Open the browser "Network inspector"

      3) Go to Site administration > Reports > Report Builder > Custom reports

      4) Create a new report with the name "My report" and source "Users" and press Save

      5) Check that the title shows "My report" and that the 4 tabs are shown (Editor, Audience, Schedules, and Access)

      6) Check that no warnings or errors are printed on screen and that report contains data

      7) Check that Network inspector contains a call to core_dynamic_tabs_get_content WS. Open the details and check it contains these arguments:

      args: {tab: "core_reportbuilder\output\dynamictabs\editor", jsondata: "{"reported":"<REPORTID>","foo":"bar"}"}

      8) Click on the other tabs (Audience, Schedules and Access) and check that no errors or warnings are shown either and that everything works as expected. Also  check that Network inspector contains a call to core_dynamic_tabs_get_content WS. Open the details and check it contains these arguments (no foo=>bar argument for these 3 tabs, just reportid):

      args: {tab: "core_reportbuilder\output\dynamictabs\<TAB>", jsondata: "{"reported":"<REPORTID>"}"}

      9) Switch back to Editor tab, confirm request to core_dynamic_tabs_get_content contains following arguments:

      args: {tab: "core_reportbuilder\output\dynamictabs\editor", jsondata: "{"reported":"<REPORTID>","foo":"bar"}"}
      

       

      Show
      1) Apply the MDL-73495-test.patch patch to your site 2) Open the browser "Network inspector" 3) Go to Site administration > Reports > Report Builder > Custom reports 4) Create a new report with the name "My report" and source "Users" and press Save 5) Check that the title shows "My report" and that the 4 tabs are shown (Editor, Audience, Schedules, and Access) 6) Check that no warnings or errors are printed on screen and that report contains data 7) Check that Network inspector contains a call to core_dynamic_tabs_get_content WS. Open the details and check it contains these arguments: args: {tab: "core_reportbuilder\output\dynamictabs\editor" , jsondata: "{" reported ":" <REPORTID> "," foo ":" bar "}" } 8) Click on the other tabs (Audience, Schedules and Access) and check that no errors or warnings are shown either and that everything works as expected. Also  check that Network inspector contains a call to core_dynamic_tabs_get_content WS. Open the details and check it contains these arguments (no foo=>bar argument for these 3 tabs, just reportid): args: {tab: "core_reportbuilder\output\dynamictabs\<TAB>" , jsondata: "{" reported ":" <REPORTID> "}" } 9) Switch back to Editor tab, confirm request to core_dynamic_tabs_get_content contains following arguments: args: {tab: "core_reportbuilder\output\dynamictabs\editor", jsondata: "{"reported":"<REPORTID>","foo":"bar"}"}  

      When defining data attributes for individual tabs, these attributes are not shown on the tabs HTML structure.

      Data attributes can be used in each individual tab for verifying permissions or passing other information, and also are added to the HTML structure so they can be used in our JS code.

      Right now we are adding data attributes to the main dynamic tabs container and then also to each tab. Main container data does not seem to be of much use so this can be improved with just passing data to each tab container and fixing mustache file to add those attributes to the generated HTML code.

        1. MDL-73495-test.patch
          0.5 kB
        2. Step 7_Screenshot.PNG
          Step 7_Screenshot.PNG
          138 kB
        3. Step 8_Screenshot.PNG
          Step 8_Screenshot.PNG
          134 kB
        4. Step 9_Screenshot.PNG
          Step 9_Screenshot.PNG
          134 kB

            davidcarrillo David Carrillo
            davidcarrillo David Carrillo
            Mikel Martín Corrales Mikel Martín Corrales
            Ilya Tregubov Ilya Tregubov
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 15 minutes
                6h 15m

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