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

Comment JS error when run in embedded page layouts

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-76694-401
    • MDL-76694-403
    • MDL-76694-master
    • Hide
      1. Go to a course
      2. Add the comment block
      3. Configured the comments block to show on "Any page", via block settings
      4. Confirm you can use the block to add comment
      5. Create an assignment and view it
      6. Click "Grade" to go to the grader pane
      7. Verify the page loads properly and you see no errors in the console of your browser's dev tools
      8. Now, log out
      9. Log in as a student
      10. Go to the assignment
      11. On the Submission Status page (mod/assign/view), Verify you don't see any errors in the console
      12. Expand the comments and Verify you're able to add and remove comments
      Show
      Go to a course Add the comment block Configured the comments block to show on "Any page", via block settings Confirm you can use the block to add comment Create an assignment and view it Click "Grade" to go to the grader pane Verify the page loads properly and you see no errors in the console of your browser's dev tools Now, log out Log in as a student Go to the assignment On the Submission Status page (mod/assign/view), Verify you don't see any errors in the console Expand the comments and Verify you're able to add and remove comments

      Replication

      1. Add a Comments block in the Grader's page (view.php?id=X&rownum=0&useridlistid=Y&action=grading).
      2. Click on the button to rate any activity.
      3. You get a JavaScript error, and the PDF viewer is not loaded:

        "container" is not defined.
        

        See this line in comment/comment.js:
        var container = Y.one('#comment-ctrl-'+this.client_id);

      Alternative replication using LTI provider:

      1. Create an assignment and publish it over LTI
      2. Add a comments block to that assignment page (this will work if the assignment is accessed via the site directly)
      3. Go to a consumer site, and set up a link into the published assignment using an embedded launch container
      4. Observe that when you launch into the assignment, you'll see console errors.
        If you try to add a file submission to the assignment, you'll be unable to, since the file manager just spins forever.

       

        1. 01_click_with_comments.png
          01_click_with_comments.png
          89 kB
        2. 02_no_pdf_viewer.png
          02_no_pdf_viewer.png
          199 kB
        3. MDL-76694.png
          MDL-76694.png
          691 kB

            jaked Jake Dallimore
            ignaciogros Ignacio
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 52 minutes
                4h 52m

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