SCORM Object Stage Dimension Error

SCORM Object Stage Dimension Error

از Andrew Becks در
Number of replies: 26

Hello. I am having an issue with imported SCORM objects. I have changed/modified the values for the stage width/height, but it doesn't seen to make a difference. It looks like no matter what I do, when I try to view the scorm package in the same window, it will not resize the stage (see attachment.)

I have tried a few solutions for simialr problems, but I've had no luck.

Any help would be greatly appreciated. Thanks!

Andrew

Attachment scormissue.GIF
میانگین امتیازات:  -
In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Ron Meske در
عکس Particularly helpful Moodlers
Hi Andrew,

It looks like the issue may be with your SCORM object. To verify, try opening the SCORM activity in a new window instead of in the same window.

Ron
In reply to Ron Meske

Re: SCORM Object Stage Dimension Error

از Andrew Becks در

Hi Ron,

Thanks so much for the response. When I open it in a new window, everything seems to be fine. Do you think that this is an issue with the SCORM module that I've imported? I've tried a few and I get the same results with all of them. They were all created with Outstart's Evolution LCMS.

If it is an issue with the imported module, is this a setting I could change in the SCORM zip before I import it? Is so, where would I modify this setting in the SCORM package?

Thanks again!

Andrew

In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Dan Marsden در
عکس Core developers عکس Particularly helpful Moodlers عکس Peer reviewers عکس Plugin developers عکس Plugins guardians عکس Testers عکس Translators
there were some display issues with SCORM in previous versions of moodle - make sure you are using 1.9.3 or higher. - also we've heard some people having issues with their custom themes interferring with the SCORM player - try swapping to the standard theme to see if this is the issue.
In reply to Dan Marsden

Re: SCORM Object Stage Dimension Error

از Dave Perry در
عکس Testers
My colleague created a SCORM object using Articulate Quizmaker, but it was haphazard whether, as at the start of this thread, moodle would pay attention to the stage size settings. From what I remember, it sometimes listened to height but not width, even in a freshly-installed 1.9.3 moodle.


Dave
In reply to Dave Perry

Re: SCORM Object Stage Dimension Error

از Andrew Becks در

Thanks Dan and David,

I just installed a fresh copy of 1.9.3 late last week, and I'm still not having any luck. For me, it is not responding to height or width settings.

Andrew

In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Piers Harding در
Please attach your SCORM package to this thread, with a screen shot of your settings (in Moodle), and describe exactly how you expect it to look when it plays, and I will follow this up.

Cheers,
Piers Harding.

In reply to Piers Harding

Re: SCORM Object Stage Dimension Error

از Cori Kocher در
Hi Piers,
Here is the problem we are having with our SCORM package display in v1.9.3...
I will email the zip file directly to you.
Thanks,
Cori


We want it to look like this (this is how it is displaying in Moodle v1.9)
width = 100% height = 500 px
scorm-v1.9.jpg

And this is how it is displaying in v1.9.3 regardless of what dimensions we give it in the settings (this is on our testing site, which is why the SCORM package isn't actually displaying in the little window, but even when the file is loaded, it doesn't load correctly. You can make out our footer behind the SCORM window.)
scorm-v1.9.3.jpg
In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Cori Kocher در
Hi Andrew,
Did you ever get your SCORM packages to display correctly in v1.9.3? We have a similar problem with our SCORM packages displaying in a very small stage area despite changing the stage dimension. (Our SCORM packages are also imported from Outstart Evolution LCMS.)
Thanks for any help,
Cori
In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Jeff Forssell در
I've also run into similar problem on a 1.9.3. I don't have time right now to post the file and settings unfortunately, but I remember that the last time I tried the height changed but not the width. But I think I have also had a problem with the height not reacting.
In reply to Andrew Becks

Re: SCORM Object Stage Dimension Error

از Pete Richardson در

We are having the same problem since updating from v1.9 to v1.9.4

Previously, the content displayed properly but now the stage height seems reduced as some content is not appearing at the bottom of the stage (see fig attached).

The full content is shown if I set the package to open in a new window but the associated navigation and exit screen tends to confuse the students.

I’ve changed the stage settings on the update page and tried different themes to no avail.

It would be nice to have it working OK with the ‘same window’ option.

Moodle v1.9.4
MySQL v5.0.37
PHP v5.2.1
Windows 2003 Server
IIS v6

Many thanks

Pete

Attachment scorm-stage-1.jpg
In reply to Pete Richardson

Re: SCORM Object Stage Dimension Error

از Saurabh Pangarkar در
Even I am facing the same problem. I have upgraded my Moodle version to the latest stable release but no success yet. I believe there is some outer frame which is assuming a certain maximum size. If you set the dimensions of your content frame to something smaller like 100 by 100, it works. This is making me think if setting the size of the content will ever help. And if that is true, we may need to look at the player code.

In the mod>scorm folder there is a file named player.php. On line 317 or so, there is a function call, openpopup (...). An alert call returned the correct dimensions I set while loading the package. But the window is still smaller than the alerted dimensions.

Do you have any ideas?

Best regards,
Saurabh Pangarkar
In reply to Saurabh Pangarkar

Re: SCORM Object Stage Dimension Error

از Joe Wieloch در
Hi, I had a similar problem. When the browser was resized the scorm mod resize code would not respect the size I set for the course height and I would get a resulting scrollbar.

I found where the code changes the size of my container:
mod/scorm/rd.js

// override total height with configured height if it is defined
if (cheight > 0) {
winheight = cheight;
}
var finalheighttoc = winheight - totalheighttoc;
if (finalheighttoc <= 0) {
finalheighttoc = winheight;
}
var finalheight = (cheight > 0) ? cheight : winheight - totalheight;
if (finalheight <= 0) {
finalheight = winheight;
}

Around line 74 (the bold text above) I put in a hack to keep my configured height. This is a very poor way to fix it for product, but great for me because it works :D

Seems like the finalheight should be the configured height if it's set.

Anyway, I hope this helps someone.

- Joe

In reply to Joe Wieloch

Re: SCORM Object Stage Dimension Error

از Ayari Cuevas در

Hi everybody:

I have the same problem with SCORM. I'm not sure if it's because of the version of Internet Explorer, but before I installed the new version 8, I had moodle 1.9.3 and 1.9.4 with Internet Explorer 7 and everything worked perfectly with SCORM.

I've tried to solve the problem since then, however the only way I'm able to work with my packages is to open them in a new window.

Today I found SCORM is not the only mod with trouble. I'm using page format in my course and all the windows open in a size of 50 x 50 no more.

Maybe someone can help!!!!

Thank you very much.

PD. By the moment I'll try the solution by Joe Wieloch to see if that solves the problem with SCORM

In reply to Joe Wieloch

Re: SCORM Object Stage Dimension Error

از Sid Verber در
Hi

I've also been having problems since upgrading to 1.9.3. I was using a stage height of 700, but since the upgrade, the height gets truncated. I can prevent the truncation by setting a stage height of 1000+, but this then adds lots of space below the SCORM object.

Another problem then raises its head, in that the horizontal scroll bar is off the screen -the user has to scroll vertically to find it. This wouldn't be an issue, except that the TOC on the left is too wide for the window if someone is using a 1024 x 768 screen. We have to use the left-hand TOC rather than a drop-down list. There doesn't seem to be any way of setting the percentage of horizontal real estate occupied by the TOC and the content window. This percentagr must be set somewhere. Is it in player.php or in a style sheet? Any help for these issues gratefully received.

Sid


In reply to Sid Verber

Re: SCORM Object Stage Dimension Error

از Kurth Wikström در

Hi

This problem can be related to your theme configuration. In some themes the stylesheets that form your page can be turned off!

Open the folder of your selected theme! Edit config.php with notepad or similar. Be sure that the parameters;

$THEME->modsheets = true;

and

$THEME->blocksheets = true;

or both set to true.

Save and clean your temporary internetfiles in the browser.

I Hope that solves it!

Kurth

In reply to Kurth Wikström

Re: SCORM Object Stage Dimension Error

از Sid Verber در
Hi Kurth

Thanks for the tip, but it doesn't solve the problems. I checked my config.php and both parameters were set to true. I then tried using the standard Moodle theme, but still got the same problem with the stage size and width of the TOC. There must be a parameter somewhere which sets the relative width of the TOC frame and the main SCORM display area.

Sid
In reply to Sid Verber

Re: SCORM Object Stage Dimension Error

از Kurth Wikström در

Hi Sid

Be sure to have a copy of the files config.php and styles.php in the theme you are using. Compare them with the ones in "standard theme"

The style for the TOC box is in root\mod\scorm\styles.php and the class is #mod-scorm-player #tocbox.

Use a DOM inspector (like DebugBar) to verify this!

Kurth

In reply to Kurth Wikström

Re: SCORM Object Stage Dimension Error

از Sid Verber در
Hi Kurt

I've checked that the files config.php and styles.php are in my theme, and they are the same as in the standard theme. I've also tried editing root\mod\scorm\styles.php, but with no success. The lines I've tried editing are:


#mod-scorm-player .toc {

width: 80%;

margin-left: 20%;

Tried changing to 90% and 10%


#mod-scorm-player #tocbox {

position: relative;

left: 0px;

width: 24%;

font-size: 0.8em;

Tried changing to 14%

It's frustrating because the TOC box is forcing essential elements of the SCORM object off the right of the SCORM box, so users have to scroll right to find them. Are there any other styles which I should be altering to reduce the width of the TOC box?

Best wishes

Sid



In reply to Sid Verber

Re: SCORM Object Stage Dimension Error

از nicholas turner در

I too was having trouble with the resizing of SCORM modules and after reading this post i have managed to come up with a solution which works for me.

The file i had to edit was root\mod\scorm\styles.php as mentioned in the previous post.

However i edited:

.mod-scorm .scoframe {

   position: relative;

   width: 100%;

   height: 100%;

}

mess around with the height attribute and u'll find that the SCORM stage increase / decreases. I settled for a size of 127%, anything bigger than this i found that moodle added a scroll bar to the SCORM which i did not want

Hope this helps anyone else with this problem

In reply to nicholas turner

Re: SCORM Object Stage Dimension Error

از Ayari Cuevas در
Hi everybody:

I had the problem of dimension in SCORM so I tried some of the possible solutions posted here. However no of them worked for me. Then I found a code into the theme EduMoodle that I tried into my own theme and others and it solved the problem.

Just copy the following code into the file styles_layout of your theme (In some themes such as in the aardvark theme, the name of the file stats with the theme name, for example: aardvark_layout instead of styles_layout):



/***
*** Modules: Scorm
***/
.structlist {

list-style-type: none;
white-space: nowrap;
font-size: small;

}

.orgtitle {

font-weight: bold;
font-size: small;

}

#mod-scorm-player #scormpage {

position: relative;
width: 100%;
height: 100%;

}
.mod-scorm .top {

vertical-align: top;
}

.mod-scorm .scorm-left {

text-align: left;
}

.mod-scorm .scorm-center {

text-align: center;
}

.mod-scorm .scorm-right {

text-align: right;
height: 100%;
}


.mod-scorm .scoframe {


width: 100%;
height: 100%;
frameborder: 0px;

}





#mod-scorm-player #tochead {



text-align: center;

top: 3px;

height: 30px;

}

#mod-scorm-player .toc {

width: 80%;

margin-left: 20%;

}

#mod-scorm-player .no-toc {

width: 100%;

}

#mod-scorm-player #scormobject {

height: 400px;

}

#mod-scorm-player #scormtop {

position: relative;

width: 100%;

height: 30px;

}

#mod-scorm-player #scormbrowse {

position: absolute;

left: 5px;

top: 0px;

}

#mod-scorm-player #scormnav {

position: absolute;

right: 5px;

top: 0px;

text-align: center;

top: 3px;

width: 100%;

}



#mod-scorm-view .structurehead {

text-align: center;

}



#mod-scorm-view .structurelist {

list-style-type: none;

white-space: nowrap;

}



#mod-scorm-player #scormbox {

width: 74%;

position: absolute;

right: 0px;

top: 0px;

}



#mod-scorm-player #tocbox {

position: relative;

left: 0px;

width: 24%;

font-size: 0.8em;

}



#mod-scorm-player #tochead {

position: relative;

text-align: center;

top: 3px;

height: 30px;

}



#toctree {

position:relative;

width:100%;

overflow-x: auto;

overflow-y: auto;

}

.structurelist {

list-style-type: none;

}

#mod-scorm-player .structurelist {

position: relative;

list-style-type: none;

width: 96%;

margin-left:0;

padding-left: 0;

margin-right:0;

padding-right: 0;

padding-top: 0;

padding-bottom: 0;

margin-top:0;

margin-bottom:0;

}



#mod-scorm-player .structurelist ul{

padding-left: 0.5em;

margin-left: 0.5em;

}

#mod-scorm-view .structurelist {

list-style-type: none;

white-space: nowrap;

}

a#mod-scorm-log-toggle {
font-size: 0.7em;
font-weight: bold;
}


That's it. Hope this helps.




In reply to Ayari Cuevas

Re: SCORM Object Stage Dimension Error

از Dave Arnold در

I had the same problem and finally found a good fix.  I believe the issue is actually a bug in the two files

  • mod/scorm/rd.js
  • mod/scorm/player.php

This issues still exists in moodle 1.9.10

Here is the fix. Right around line 80 in rd.js replace everything from the opening if (toctree != null) { to the closing bracket } with the following.

 if (toctree != null){
        var toctreeHeight = toctree.offsetHeight;
        //document.getElementById('toctree').style.height = finalheighttoc + 'px';
        var scoframe2 = document.getElementById('scoframe1');
		scoframe2.style.height=cheight + 'px';
		scoframe2.style.width=cwidth + 'px';
        document.getElementById('scormobject').style.height = finalheight + 'px';
    }else{
        var scoframe2 = document.getElementById('scoframe1');
		scoframe2.style.height=cheight + 'px';
		scoframe2.style.width=cwidth + 'px';
        document.getElementById('scormobject').style.height = finalheight + 'px';
    }

On mod/scorm/player.php on line 285 move the iframe tag below the script tag. It should look like this.

  
  echo "<iframe id=\"scoframe1\" class=\"scoframe\" name=\"scoframe1\" src=\"{$fullurl}\"></iframe>\n";   
  echo "<script type=\"text/javascript\">scorm_resize(".$scorm->width.", ".$scorm->height.");</script>\n";

In short the specified height was getting applied to the toctree div instead of the iframe and with the call to resize the iframe before it was printed you'd get a null value. This is why the iframe must come before the script tag.

Hope this helps.

In reply to Dave Arnold

Re: SCORM Object Stage Dimension Error

از Dan Marsden در
عکس Core developers عکس Particularly helpful Moodlers عکس Peer reviewers عکس Plugin developers عکس Plugins guardians عکس Testers عکس Translators

Hi Dave, thanks for sharing this! - the player in Moodle 2.0 has been completely rewritten and should display a lot better than it has in the past - I'd be happy to add this above fix to 1.9.10 but it would need to be tested in all browsers with both standard and custom themes before we could include it - can you please give more information on what you've tested this with?

In reply to Dan Marsden

Re: SCORM Object Stage Dimension Error

از Dave Arnold در

Thanks Dan!,

I've tested it in IE8, Chrome and Firefox 3.6.12 browsers. I've also tested with the darkb, standard and funky_black themes.  In all cases the iframe adjusts to the height and width specified, even on the smaller width of the funky_black theme the scorm module displayed the size specified.

Getting this in 1.9.10+ would be great! Not to mention it would be one less thing for me to re-factor with when I do updates.

While the new scorm player for Moodle 2 looks great I can't upgrade to moodle 2 for awhile.  The biggest hold up for me is that the makers of face-to-face have not publish their upgraded module yet.  I'm also not happy Moodle 2 requires PHP 5.2 but those are the breaks.

In reply to Dave Arnold

Re: SCORM Object Stage Dimension Error

از Dan Marsden در
عکس Core developers عکس Particularly helpful Moodlers عکس Peer reviewers عکس Plugin developers عکس Plugins guardians عکس Testers عکس Translators

Thanks Dave! - can you please create a new bug in the tracker with your code?