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

Participants page initialises core_user/participants JS in a way that triggers the "Too many params passed to js_call_amd" debug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.2, 3.9
    • Fix Version/s: None
    • Component/s: User management
    • Labels:
    • Testing Instructions:
      Hide
      1. Log as admin
      2. Set the debugging level to developer debugging and let debugging messages display
      3. Make sure that Site administration > Advanced features > Enable notes is checked
      4. Install French package
      5. Go to a course with enrolled participants
      6. Go to the participants page
      7. Switch to the French language
      8. TEST Check that you do not see the "Too many params passed to js_call_amd(...)" warning below the list of participants.
      9. You ccan switch back to your default language if you prefer now
      10. Select some participants
      11. Below the list, choose "With selected users ..." > Add a new note
      12. TEST In the popup, check that hovering the help icon shows title "Help with Context" and clicking the icon shows well formatted help text.
      Show
      Log as admin Set the debugging level to developer debugging and let debugging messages display Make sure that Site administration > Advanced features > Enable notes is checked Install French package Go to a course with enrolled participants Go to the participants page Switch to the French language TEST Check that you do not see the "Too many params passed to js_call_amd(...)" warning below the list of participants. You ccan switch back to your default language if you prefer now Select some participants Below the list, choose "With selected users ..." > Add a new note TEST In the popup, check that hovering the help icon shows title "Help with Context" and clicking the icon shows well formatted help text.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_39_STABLE
    • Pull Master Branch:

      Description

      As discovered by Eloy Lafuente (stronk7) in MDL-62354, when the string publishstate_help exceeds certain length, a debugging warning is raised:

      Too many params passed to js_call_amd("core_user/participants", "init")
              line 1025 of /lib/outputrequirementslib.php: call to debugging()
              line 337 of /user/index.php: call to page_requirements_manager->js_call_amd()
      

      String length should not affect these things, an alternative way for passing data for the module shall be researched.

        Attachments

        1. 0001-MDL-62468-output-Improve-the-debug-message-on-js_cal.patch
          2 kB
          David Mudrák (@mudrd8mz)
        2. image-2020-02-05-13-50-29-575.png
          57 kB
          Arnaud Trouvé
        3. screenshot-1.png
          57 kB
          David Mudrák (@mudrd8mz)
        4. screenshot-2.png
          54 kB
          David Mudrák (@mudrd8mz)

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Peer reviewer:
              David Mudrák (@mudrd8mz)
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              16 Vote for this issue
              Watchers:
              20 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 55 minutes
                  1h 55m