Moodle
  1. Moodle
  2. MDL-26212

The size of SCORM decrease when there is a modification in the browser

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: SCORM
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16256

      Description

      The first, sorry for my english.

      In moodle 2.0 when you have a SCORM displayed you can watch it correctly. But when there is a change in the browser, for example, decrease the size of the window or display a search or the firebug, etc, the size of the SCORM decrease, the width decrease, so now you can't watch it correctly.

      The SCORM should stay with fixed size.

      Thanks

        Issue Links

          Activity

          Hide
          Dan Marsden added a comment -

          assigning to Piers - any chance you could have a look at this? - on first load the player loads fine, but on page resize (in FF at least) the player shrinks quite small.

          Show
          Dan Marsden added a comment - assigning to Piers - any chance you could have a look at this? - on first load the player loads fine, but on page resize (in FF at least) the player shrinks quite small.
          Hide
          Adam Larson added a comment -

          There is a problem with the "newwidth" variable on line 181 of moodle/mod/scorm/module.js file. In every re-size case it sends you to the "else" statement which puts the size of the module at 600px. I dont know why this variable is incorrect, but I have a workaround.

          Change line 185 of that same file to match line 182 of that file. This will always have the re-size of the window dynamically performed.

          SO CHANGE THIS LINE...
          scorm_layout_widget.setStyle('width', '600px');

          TO THIS....
          scorm_layout_widget.setStyle('width', newwidth+'px');

          That should fix the problem in IE and Firefox, although it is still giving me issues in Chrome. Be sure to hold shift and reload the page when you view it after you make the changes, this will force it to update the javascript cached in the page.

          Show
          Adam Larson added a comment - There is a problem with the "newwidth" variable on line 181 of moodle/mod/scorm/module.js file. In every re-size case it sends you to the "else" statement which puts the size of the module at 600px. I dont know why this variable is incorrect, but I have a workaround. Change line 185 of that same file to match line 182 of that file. This will always have the re-size of the window dynamically performed. SO CHANGE THIS LINE... scorm_layout_widget.setStyle('width', '600px'); TO THIS.... scorm_layout_widget.setStyle('width', newwidth+'px'); That should fix the problem in IE and Firefox, although it is still giving me issues in Chrome. Be sure to hold shift and reload the page when you view it after you make the changes, this will force it to update the javascript cached in the page.
          Hide
          Belen Olalla added a comment -

          Thank you very much.

          I have been testing and I have checked that the problem is resolved for the different browsers(IE, firefox, Chrome and Opera). The only problem I have noticed is that when the firebug or a search is opened the SCORM moves towards the right.

          For the rest, everything seems to work correctly.

          Thanks again.

          Show
          Belen Olalla added a comment - Thank you very much. I have been testing and I have checked that the problem is resolved for the different browsers(IE, firefox, Chrome and Opera). The only problem I have noticed is that when the firebug or a search is opened the SCORM moves towards the right. For the rest, everything seems to work correctly. Thanks again.
          Hide
          Piers Harding added a comment -

          trial patch to fix resizing issue - this needs cross browser testing.

          Cheers,
          Piers Harding.

          Show
          Piers Harding added a comment - trial patch to fix resizing issue - this needs cross browser testing. Cheers, Piers Harding.
          Hide
          Dan Marsden added a comment -

          tested in IE and FF

          Show
          Dan Marsden added a comment - tested in IE and FF
          Hide
          Dan Marsden added a comment -

          tested in Chrome and pull request submitted

          Show
          Dan Marsden added a comment - tested in Chrome and pull request submitted
          Hide
          Belen Olalla added a comment -

          Good morning,

          I have tested the indicated solution and I have verified that scorm doesn,t reduce its size as before. Now, the problem is that when browser resize, the width of the scorm grows. It happens in the different browsers.

          Show
          Belen Olalla added a comment - Good morning, I have tested the indicated solution and I have verified that scorm doesn,t reduce its size as before. Now, the problem is that when browser resize, the width of the scorm grows. It happens in the different browsers.
          Hide
          Dan Marsden added a comment -

          Hi, the SCORM player should resize with the size of the browser so that it uses the maximum available space - this is expected behavior.

          Show
          Dan Marsden added a comment - Hi, the SCORM player should resize with the size of the browser so that it uses the maximum available space - this is expected behavior.
          Hide
          Belen Olalla added a comment -

          hi,

          what I mean is that when the SCORM is displayed for the first time with the maximun size of the browser , in my case, its size is 779x573. I test to reduce the size of the browser and increase the browser again to its maximun size, now the size os the scorm is 859x573, if I repeat the operation the size is 939x593. So, the scorm doesn,t recover the previous size, but its width increases every time.

          I hope I explained clearly.

          Cheers.

          Show
          Belen Olalla added a comment - hi, what I mean is that when the SCORM is displayed for the first time with the maximun size of the browser , in my case, its size is 779x573. I test to reduce the size of the browser and increase the browser again to its maximun size, now the size os the scorm is 859x573, if I repeat the operation the size is 939x593. So, the scorm doesn,t recover the previous size, but its width increases every time. I hope I explained clearly. Cheers.
          Hide
          Dan Marsden added a comment -

          I've retested in FF and IE and can't reproduce any problems with the standard theme - do you have a custom theme or customised SCORM code or any zoom setting made in your browser? - The SCORM player resizes to the full width of the window available and doesn't add a horizontal scroll bar to the full browser window.

          please make sure you have applied the patch correctly and have no other changes to the SCORM module that might cause this for you.

          Show
          Dan Marsden added a comment - I've retested in FF and IE and can't reproduce any problems with the standard theme - do you have a custom theme or customised SCORM code or any zoom setting made in your browser? - The SCORM player resizes to the full width of the window available and doesn't add a horizontal scroll bar to the full browser window. please make sure you have applied the patch correctly and have no other changes to the SCORM module that might cause this for you.
          Hide
          Helen Foster added a comment -

          Fix included in latest 2.0.1+ weekly. Thanks everyone.

          Show
          Helen Foster added a comment - Fix included in latest 2.0.1+ weekly. Thanks everyone.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: