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

Two inconsistent layout files should be consistent, use id=page-content rather than content

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Select Base theme.
      2. Go to a course page and add a SCORM package, such as the "Basic Run-Time Calls" golf sample from SCORM.com.
      3. Set the SCORM to display in a new window
      4. Open the SCORM and advance at least one page.
      5. Click the Exit button within the SCORM
      6. When prompted, choose Ok to save your progress

      Ensure that no errors are thrown. Specifically, this error should be fixed:
      Uncaught TypeError: Cannot read property 'appendChild' of null
      Display course structure on entry page Help with Display course structure on entry page

      I apologize, I'm not sure which user-visible functionality is affected. I'll be out of the office for a while, so I probably won't track it down soon, but clearly a) there should not be errors thrown and b) consistent naming between themes and layouts is a good thing.

      Show
      Select Base theme. Go to a course page and add a SCORM package, such as the "Basic Run-Time Calls" golf sample from SCORM.com. Set the SCORM to display in a new window Open the SCORM and advance at least one page. Click the Exit button within the SCORM When prompted, choose Ok to save your progress Ensure that no errors are thrown. Specifically, this error should be fixed: Uncaught TypeError: Cannot read property 'appendChild' of null Display course structure on entry page Help with Display course structure on entry page I apologize, I'm not sure which user-visible functionality is affected. I'll be out of the office for a while, so I probably won't track it down soon, but clearly a) there should not be errors thrown and b) consistent naming between themes and layouts is a good thing.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-47915_master

      Description

      All of the layout files have a main content div, which is always called id="page-content", except in two of the embedded.php layouts. This creates a problem for mod_scorm, whose module.js has long used getElementById('page-content').

      base/layout/embedded.php: <div id="content"
      base/layout/frontpage.php: <div id="page-content">
      base/layout/general.php: <div id="page-content">
      base/layout/report.php: <div id="page-content"
      bootstrapbase/layout/columns1.php: <div id="page-content"
      bootstrapbase/layout/columns2.php: <div id="page-content"
      bootstrapbase/layout/columns3.php: <div id="page-content"
      bootstrapbase/layout/embedded.php: <div id="page-content"
      bootstrapbase/layout/maintenance.php: <div id="page-content"
      bootstrapbase/layout/popup.php: <div id="page-content"
      bootstrapbase/layout/secure.php: <div id="page-content"
      canvas/layout/embedded.php: <div id="content"
      canvas/layout/frontpage.php: <div id="page-content">
      canvas/layout/general.php: <div id="page-content">
      canvas/layout/report.php: <div id="page-content">
      clean/layout/columns1.php: <div id="page-content"
      clean/layout/columns2.php: <div id="page-content"
      clean/layout/columns3.php: <div id="page-content"
      clean/layout/embedded.php: <div id="page-content"
      clean/layout/maintenance.php: <div id="page-content"
      clean/layout/secure.php: <div id="page-content"

        Attachments

          Activity

            People

            Assignee:
            lazydaisy Mary Evans
            Reporter:
            raymor Ray Morris
            Peer reviewer:
            Marina Glancy
            Integrator:
            Dan Poltawski
            Tester:
            Simey Lameze
            Participants:
            Component watchers:
            Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Jan/15