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

SCORM External AICC Type doesn't work at all in 2.6 and 2.7 versions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.1
    • Fix Version/s: 2.6.5, 2.7.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      MAKE SURE YOUR SERVER ALLOWS OUTGOING HTTP AND YOUR SITE USES A PUBLIC URL (not localhost or 192.168.x.x etc)

      go to admin > plugins > activity modules > SCORM
      make sure the setting "Enable direct AICC url" is set to "yes"
      make sure the setting "Enable external AICC HACP" is set to "yes"

      Test 1
      Create a new SCORM in your site - select the scormtype "external AICC URL" and use the following url:
      https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123
      Enter the course and make sure it works.

      Test 2
      Create a new SCORM in your site - select the scormtype "Uploaded package" and add the AICC Zip package attached to this bug "OLSA_AICC_FULLTESTCONTENT_HTTP.zip"
      Enter the course and make sure it works.

      Show
      MAKE SURE YOUR SERVER ALLOWS OUTGOING HTTP AND YOUR SITE USES A PUBLIC URL (not localhost or 192.168.x.x etc) go to admin > plugins > activity modules > SCORM make sure the setting "Enable direct AICC url" is set to "yes" make sure the setting "Enable external AICC HACP" is set to "yes" Test 1 Create a new SCORM in your site - select the scormtype "external AICC URL" and use the following url: https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123 Enter the course and make sure it works. Test 2 Create a new SCORM in your site - select the scormtype "Uploaded package" and add the AICC Zip package attached to this bug "OLSA_AICC_FULLTESTCONTENT_HTTP.zip" Enter the course and make sure it works.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull 2.7 Branch:
      m27_MDL-46639
    • Pull Master Branch:
      master_MDL-46639

      Description

      There seems to be a serious bug in the SCORM External AICC code which means you can't connect to external SCORM courses from the latest versions of Moodle 2.6 and 2.7 (at time of writing this is 2.6.4 and 2.7.1).

      I believe the errors are in /mod/scorm/module.js and /mod/scorm/locallib.php

      In module.js, line approx 746...

      if (tree.rootNode.children[0].title !== scoes_nav[launch_sco].url) {
                  var node = tree.getNodeByAttribute('title', scoes_nav[launch_sco].url);
                  if (node !== null) {
                      scorm_first_url = node;
                  }
      } else {
                  scorm_first_url = tree.rootNode.children[0];
      }
      

      … should be…

      if (tree.rootNode.children.length > 0) {
            if (tree.rootNode.children[0].title !== scoes_nav[launch_sco].url) {
                       var node = tree.getNodeByAttribute('title', scoes_nav[launch_sco].url);
                        if (node !== null) {
                               scorm_first_url = node;
             }
             } else {
                        scorm_first_url = tree.rootNode.children[0];
             }
      }
      

      In locallib.php approx line 304-ish...

      } else if ($scorm->scormtype === SCORM_TYPE_AICCURL  and $cfg_scorm->allowtypeexternalaicc) {
              require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php");
              // AICC
              if (!scorm_parse_aicc($scorm)) {
                  $scorm->version = 'ERROR';
              }
              $scorm->version = 'AICC';
      

      … should, I think, look like…

      } else if ($scorm->scormtype === SCORM_TYPE_AICCURL  and $cfg_scorm->allowtypeexternalaicc) {
              require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php");
              // AICC
              $result = scorm_parse_aicc($scorm); 
              if (!$result) {
                  $scorm->version = 'ERROR';
              } else {
                 $scorm->launch = $result;
              }
              $scorm->version = 'AICC';
      

      Please do let me know if there is any more information you need.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              iandavidwild Ian David Wild added a comment -

              Diff files for locallib.php and module.js, both for Moodle 2.6.4 but the same fixes work for Moodle 2.7.1

              Show
              iandavidwild Ian David Wild added a comment - Diff files for locallib.php and module.js, both for Moodle 2.6.4 but the same fixes work for Moodle 2.7.1
              Hide
              iandavidwild Ian David Wild added a comment -

              Have just raised the Priority of this bug to critical as this is completely broken functionality.

              Show
              iandavidwild Ian David Wild added a comment - Have just raised the Priority of this bug to critical as this is completely broken functionality.
              Hide
              danmarsden Dan Marsden added a comment -

              Thanks Ian - I'll try to take a look at this later this week. I've added testing instructions above with the only external AICC package we have - but if you have another one we can use for testing please add details on it here as well.

              thanks!

              Show
              danmarsden Dan Marsden added a comment - Thanks Ian - I'll try to take a look at this later this week. I've added testing instructions above with the only external AICC package we have - but if you have another one we can use for testing please add details on it here as well. thanks!
              Hide
              iandavidwild Ian David Wild added a comment - - edited

              Thanks Dan for looking at this for me. Another externa AICC link to test against is:

              https://moodlestaging.skillsforhealth.org.uk/local/sfhinterop/assignableunit/manual_handling

              It should display a message telling you that you don't have access to the course. In fact all you get is a JavaScript error in mod/scorm/module.js line 745:

              Uncaught TypeError: Cannot read property 'title' of undefined

              Thanks again for your help,

              Ian.

              Show
              iandavidwild Ian David Wild added a comment - - edited Thanks Dan for looking at this for me. Another externa AICC link to test against is: https://moodlestaging.skillsforhealth.org.uk/local/sfhinterop/assignableunit/manual_handling It should display a message telling you that you don't have access to the course. In fact all you get is a JavaScript error in mod/scorm/module.js line 745: Uncaught TypeError: Cannot read property 'title' of undefined Thanks again for your help, Ian.
              Hide
              danbond Daniel Bond added a comment -

              I can confirm that we have tested this on our Totara 2.6.6 (based on Moodle 2.6.4) site, and it successfully fixes the bug in question.

              Show
              danbond Daniel Bond added a comment - I can confirm that we have tested this on our Totara 2.6.6 (based on Moodle 2.6.4) site, and it successfully fixes the bug in question.
              Hide
              martin_holden@skillsoft.com Martin Holden added a comment - - edited

              Dan - this is similar to the problem you had fixed in 2.4.1, just so we have history I linked the issue to this one

              Show
              martin_holden@skillsoft.com Martin Holden added a comment - - edited Dan - this is similar to the problem you had fixed in 2.4.1, just so we have history I linked the issue to this one
              Hide
              tony.oneill Tony O'Neill added a comment -

              The diff files resolved my External AICC problem on 2.6.4 but not on 2.7.1

              Show
              tony.oneill Tony O'Neill added a comment - The diff files resolved my External AICC problem on 2.6.4 but not on 2.7.1
              Hide
              iandavidwild Ian David Wild added a comment -

              Hi all,

              I created those diff files against 2.6.4, even though the symptoms of the problem are the same on 2.7.1. Did you want me to create diff files for 2.7.1 for testing?

              Regards,

              Ian.

              Show
              iandavidwild Ian David Wild added a comment - Hi all, I created those diff files against 2.6.4, even though the symptoms of the problem are the same on 2.7.1. Did you want me to create diff files for 2.7.1 for testing? Regards, Ian.
              Hide
              danmarsden Dan Marsden added a comment -

              Thanks Ian,

              here's a slightly modified patch from yours - we'll need to add a standard AICC package to the testing instructions too - I'll dig something out. I'll try to get this into next weeks integration review.

              Show
              danmarsden Dan Marsden added a comment - Thanks Ian, here's a slightly modified patch from yours - we'll need to add a standard AICC package to the testing instructions too - I'll dig something out. I'll try to get this into next weeks integration review.
              Hide
              danmarsden Dan Marsden added a comment -

              and thanks Martin for all the testing urls!

              Show
              danmarsden Dan Marsden added a comment - and thanks Martin for all the testing urls!
              Hide
              danmarsden Dan Marsden added a comment -

              pushing through for peer review. I can't find any AICC zip packages on my local machine that actually work - Martin any chance you could fire one through to use for testing here as well as the direct urls? - thanks heaps!

              Show
              danmarsden Dan Marsden added a comment - pushing through for peer review. I can't find any AICC zip packages on my local machine that actually work - Martin any chance you could fire one through to use for testing here as well as the direct urls? - thanks heaps!
              Hide
              danmarsden Dan Marsden added a comment -

              (Ian - just in case you're not aware, Peer review is a formal process we use for reviewing code before including in Moodle core) - here are some docs on the process:
              http://docs.moodle.org/dev/Peer_reviewing_checklist

              Show
              danmarsden Dan Marsden added a comment - (Ian - just in case you're not aware, Peer review is a formal process we use for reviewing code before including in Moodle core) - here are some docs on the process: http://docs.moodle.org/dev/Peer_reviewing_checklist
              Hide
              cibot CiBoT added a comment -

              +1 code verified against automated checks.

              Checked MDL-46639 using repository: https://github.com/danmarsden/moodle.git

              More information about this report

              Show
              cibot CiBoT added a comment - +1 code verified against automated checks. Checked MDL-46639 using repository: https://github.com/danmarsden/moodle.git MOODLE_26_STABLE (branch: m26_MDL-46639 | CI Job ) MOODLE_27_STABLE (branch: m27_MDL-46639 | CI Job ) master (branch: master_MDL-46639 | CI Job ) More information about this report
              Hide
              tony.oneill Tony O'Neill added a comment -

              The OLSA zip file loads and works fine in 2.7.1

              Show
              tony.oneill Tony O'Neill added a comment - The OLSA zip file loads and works fine in 2.7.1
              Hide
              tony.oneill Tony O'Neill added a comment -

              Ian if you have diff files against 2.7.1, I will test them. I am using OLSA content

              Show
              tony.oneill Tony O'Neill added a comment - Ian if you have diff files against 2.7.1, I will test them. I am using OLSA content
              Hide
              iandavidwild Ian David Wild added a comment -

              Hi Tony,

              Just looking at the previous comments, am I right in thinking fixes have already been merged into MOODLE_27_STABLE?

              Ian,

              Show
              iandavidwild Ian David Wild added a comment - Hi Tony, Just looking at the previous comments, am I right in thinking fixes have already been merged into MOODLE_27_STABLE? Ian,
              Hide
              danmarsden Dan Marsden added a comment -

              Hi Ian - not quite.

              I think Tony is saying that when using the zip file that Martin uploaded AICC works fine in Moodle 2.7.1 - I've included that in the testing instructions on this bug as I've slightly modified the code path for AICC uploaded zips in the patch as well as external aicc packages.

              • getting a fix into Moodle core goes through a process - here's a short version:
                developer attaches a git patch to the issue
                submits for peer review
                Automatic CiBot check runs to check validity of code against codechecker
                another developer peer reviews code and gives feedback
                If peer review passes submit for integration review
                integration team reviews patch and makes sure it looks good - approves for integration
                QA team run through testing instructions on bug to make sure it fixes the bug reported.
                if it passes it gets included in the weekly build.
                behind the scenes we also run the behat/unit tests to make sure the fix doesn't break anything - unfortunately we don't have many behat or unit tests for SCORM yet.
                More info on the full process is available here: https://docs.moodle.org/dev/Process
              Show
              danmarsden Dan Marsden added a comment - Hi Ian - not quite. I think Tony is saying that when using the zip file that Martin uploaded AICC works fine in Moodle 2.7.1 - I've included that in the testing instructions on this bug as I've slightly modified the code path for AICC uploaded zips in the patch as well as external aicc packages. getting a fix into Moodle core goes through a process - here's a short version: developer attaches a git patch to the issue submits for peer review Automatic CiBot check runs to check validity of code against codechecker another developer peer reviews code and gives feedback If peer review passes submit for integration review integration team reviews patch and makes sure it looks good - approves for integration QA team run through testing instructions on bug to make sure it fixes the bug reported. if it passes it gets included in the weekly build. behind the scenes we also run the behat/unit tests to make sure the fix doesn't break anything - unfortunately we don't have many behat or unit tests for SCORM yet. More info on the full process is available here: https://docs.moodle.org/dev/Process
              Hide
              tony.oneill Tony O'Neill added a comment -

              Correct. The zip file loads and works fine with 2.7.1 but the external AICC URL

              https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123l

              or the OLSA stuff still gives a blanks screen in 2.7.1

              Show
              tony.oneill Tony O'Neill added a comment - Correct. The zip file loads and works fine with 2.7.1 but the external AICC URL https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123l or the OLSA stuff still gives a blanks screen in 2.7.1
              Hide
              tony.oneill Tony O'Neill added a comment -

              Updated my 2.7.1 site with the latest Moodle 2.7.1 download. External AICC URL still not working.
              The diff patches solved the problem on 2.6. Are there diff patches for 2.7 ?

              Show
              tony.oneill Tony O'Neill added a comment - Updated my 2.7.1 site with the latest Moodle 2.7.1 download. External AICC URL still not working. The diff patches solved the problem on 2.6. Are there diff patches for 2.7 ?
              Hide
              danmarsden Dan Marsden added a comment -

              Hi Tony - see the "Pull 2.7 Diff URL:" above - it's slightly different to Ian's original patch so it would be great if you could test it and let us know if it fixes it for you!

              thanks,

              Show
              danmarsden Dan Marsden added a comment - Hi Tony - see the "Pull 2.7 Diff URL:" above - it's slightly different to Ian's original patch so it would be great if you could test it and let us know if it fixes it for you! thanks,
              Hide
              tony.oneill Tony O'Neill added a comment -

              Hi Dan , no joy with the patch from "Pull 2.7 Diff URL:" .

              Show
              tony.oneill Tony O'Neill added a comment - Hi Dan , no joy with the patch from "Pull 2.7 Diff URL:" .
              Hide
              tony.oneill Tony O'Neill added a comment - - edited

              Dan, I have a solution which will fix/launch my AICC course but its a database hack. I will outline it below just in case in helps someone.

              When I add a SCORM (not aicc) activity to a course with a zip file I get 2 entries (rows) in the mdl_scorm_scoes table. Both have the same scorm id.
              When I add an External AICC link, I only get one entry in the table. If I manually insert an extra row with the same scorm id that has certain data then the
              course launches successfully.

              Show
              tony.oneill Tony O'Neill added a comment - - edited Dan, I have a solution which will fix/launch my AICC course but its a database hack. I will outline it below just in case in helps someone. When I add a SCORM (not aicc) activity to a course with a zip file I get 2 entries (rows) in the mdl_scorm_scoes table. Both have the same scorm id. When I add an External AICC link, I only get one entry in the table. If I manually insert an extra row with the same scorm id that has certain data then the course launches successfully.
              Hide
              tony.oneill Tony O'Neill added a comment - - edited

              Dan , the moodle inserted row from mdl_scorm_scoes and the row that I had to insert are below,
              ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

              id scorm manifest organization parent identifier launch scormtype title sortorder

              ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

              ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

              Show
              tony.oneill Tony O'Neill added a comment - - edited Dan , the moodle inserted row from mdl_scorm_scoes and the row that I had to insert are below, --- ----- -------- ------------ ------ ---------- ---------------------------------------------------------------------------------------------------------------------------------------------- --------- ----------- ----------+ id scorm manifest organization parent identifier launch scormtype title sortorder --- ----- -------- ------------ ------ ---------- ---------------------------------------------------------------------------------------------------------------------------------------------- --------- ----------- ----------+ 73 37     / A1 http://companyid.skillwsa.com/olsa/ro?customerId=companyid&course_id=mo_bwrd_a01_dt_enus&access_mode=aicc&HACP=1&olsa_cvs_value=1rmC4Hs6bHsG9ky&CMI=HACP sco AICC Test 0 74 37     A1 A2   sco AICC TEST 2 0 --- ----- -------- ------------ ------ ---------- ---------------------------------------------------------------------------------------------------------------------------------------------- --------- ----------- ----------+
              Hide
              danmarsden Dan Marsden added a comment -

              Hi Tony,

              thanks for that - I just found a typo in the original patch so I've updated the code on my github account linked at the top of this tracker issue - if you were able to re-test with the new patch that would be really great! - pusing this up for peer review again.

              Show
              danmarsden Dan Marsden added a comment - Hi Tony, thanks for that - I just found a typo in the original patch so I've updated the code on my github account linked at the top of this tracker issue - if you were able to re-test with the new patch that would be really great! - pusing this up for peer review again.
              Hide
              cibot CiBoT added a comment -

              +1 code verified against automated checks.

              Checked MDL-46639 using repository: https://github.com/danmarsden/moodle.git

              More information about this report

              Show
              cibot CiBoT added a comment - +1 code verified against automated checks. Checked MDL-46639 using repository: https://github.com/danmarsden/moodle.git MOODLE_26_STABLE (branch: m26_MDL-46639 | CI Job ) MOODLE_27_STABLE (branch: m27_MDL-46639 | CI Job ) master (branch: master_MDL-46639 | CI Job ) More information about this report
              Hide
              tony.oneill Tony O'Neill added a comment -

              Hi Dan , no joy with the latest patch , Tony

              Show
              tony.oneill Tony O'Neill added a comment - Hi Dan , no joy with the latest patch , Tony
              Hide
              martin_holden@skillsoft.com Martin Holden added a comment -

              I have just tested using anew install of Moodle 2.7.1 stable, and then applying the patches and it appears to solve the use of External URL for AICC launch.

              Tony - did you remember to "purge caches" before testing as the change to the module.js wont be reflected until you do.

              Show
              martin_holden@skillsoft.com Martin Holden added a comment - I have just tested using anew install of Moodle 2.7.1 stable, and then applying the patches and it appears to solve the use of External URL for AICC launch. Tony - did you remember to "purge caches" before testing as the change to the module.js wont be reflected until you do.
              Hide
              tony.oneill Tony O'Neill added a comment -

              Martin - opps I did'nt ! But I have just loaded a new install of 2.7.1 stable and purged the cache. The External AICC is now loading. Good stuff Martin/Dan , thanks Tony

              Show
              tony.oneill Tony O'Neill added a comment - Martin - opps I did'nt ! But I have just loaded a new install of 2.7.1 stable and purged the cache. The External AICC is now loading. Good stuff Martin/Dan , thanks Tony
              Hide
              danmarsden Dan Marsden added a comment -

              thanks Martin/Tony, it helps a lot when community members test patches before we integrate! - pushing this up for integration now so hopefully it should land in next weeks build.

              Show
              danmarsden Dan Marsden added a comment - thanks Martin/Tony, it helps a lot when community members test patches before we integrate! - pushing this up for integration now so hopefully it should land in next weeks build.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              cibot CiBoT added a comment -

              Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

              Show
              cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
              Hide
              marina Marina Glancy added a comment -

              Thanks everybody, integrated in 2.6, 2.7 and master

              Show
              marina Marina Glancy added a comment - Thanks everybody, integrated in 2.6, 2.7 and master
              Hide
              fred Frédéric Massart added a comment -

              Sorry, I am failing this for now.

              The test 1 is successful on each branch. But I'm not sure about the test 2. First of all, it does not display any content, so the TOC is empty and I just see a few navigation button. But more importantly, on 2.6 and master (strangely not on 2.7), I see those notices:

              Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1610
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
              5   0.5739  46334512    scorm_get_toc_get_parent_child( )   ../locallib.php:1555
               
              ( ! ) Warning: Invalid argument supplied for foreach() in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1610
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
              5   0.5739  46334512    scorm_get_toc_get_parent_child( )   ../locallib.php:1555
               
              ( ! ) Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1637
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
              5   0.5739  46334512    scorm_get_toc_get_parent_child( )   ../locallib.php:1555
               
              ( ! ) Warning: array_keys() expects parameter 1 to be array, null given in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1637
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
              5   0.5739  46334512    scorm_get_toc_get_parent_child( )   ../locallib.php:1555
              6   0.5743  46335896    array_keys ( )  ../locallib.php:1637
               
              ( ! ) Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1638
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
              5   0.5739  46334512    scorm_get_toc_get_parent_child( )   ../locallib.php:1555
               
              ( ! ) Notice: Undefined variable: usertracks in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1562
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              4   0.5733  46333752    scorm_get_toc_object( ) ../locallib.php:1850
               
              ( ! ) Notice: Trying to get property of non-object in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1852
              Call Stack
              #   Time    Memory  Function    Location
              1   0.0007  295000  {main}( )   ../view.php:0
              2   0.5692  46164240    scorm_view_display( )   ../view.php:182
              3   0.5721  46332312    scorm_get_toc( )    ../locallib.php:894
              

              Please let me know if it should pass regardless. Thanks!

              Show
              fred Frédéric Massart added a comment - Sorry, I am failing this for now. The test 1 is successful on each branch. But I'm not sure about the test 2. First of all, it does not display any content, so the TOC is empty and I just see a few navigation button. But more importantly, on 2.6 and master (strangely not on 2.7), I see those notices: Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1610 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850 5 0.5739 46334512 scorm_get_toc_get_parent_child( ) ../locallib.php:1555   ( ! ) Warning: Invalid argument supplied for foreach() in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1610 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850 5 0.5739 46334512 scorm_get_toc_get_parent_child( ) ../locallib.php:1555   ( ! ) Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1637 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850 5 0.5739 46334512 scorm_get_toc_get_parent_child( ) ../locallib.php:1555   ( ! ) Warning: array_keys() expects parameter 1 to be array, null given in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1637 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850 5 0.5739 46334512 scorm_get_toc_get_parent_child( ) ../locallib.php:1555 6 0.5743 46335896 array_keys ( ) ../locallib.php:1637   ( ! ) Notice: Undefined offset: 0 in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1638 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850 5 0.5739 46334512 scorm_get_toc_get_parent_child( ) ../locallib.php:1555   ( ! ) Notice: Undefined variable: usertracks in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1562 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 4 0.5733 46333752 scorm_get_toc_object( ) ../locallib.php:1850   ( ! ) Notice: Trying to get property of non-object in /home/fred/www/repositories/im/moodle/mod/scorm/locallib.php on line 1852 Call Stack # Time Memory Function Location 1 0.0007 295000 {main}( ) ../view.php:0 2 0.5692 46164240 scorm_view_display( ) ../view.php:182 3 0.5721 46332312 scorm_get_toc( ) ../locallib.php:894 Please let me know if it should pass regardless. Thanks!
              Hide
              danmarsden Dan Marsden added a comment -

              thanks Frédéric, I'll take a look at that tonight and get back to you.

              Show
              danmarsden Dan Marsden added a comment - thanks Frédéric, I'll take a look at that tonight and get back to you.
              Hide
              danmarsden Dan Marsden added a comment -

              grr... my bad! - pushed a commit to fix that, Vignesh is working on some behat tests at the moment - I'm hoping to find the time to add some too which should hopefully help stuff like this a lot.

              thanks!

              Show
              danmarsden Dan Marsden added a comment - grr... my bad! - pushed a commit to fix that, Vignesh is working on some behat tests at the moment - I'm hoping to find the time to add some too which should hopefully help stuff like this a lot. thanks!
              Hide
              marina Marina Glancy added a comment -

              Thanks Dan, fix pulled, back to testing

              Show
              marina Marina Glancy added a comment - Thanks Dan, fix pulled, back to testing
              Hide
              fred Frédéric Massart added a comment -

              Thanks guys. I still had some issues testing this using ngrok, but a brief test on prototype seemed to prove that the solution worked, or at least did not cause any obvious regression. So Marina, Raj and myself decided to pass this test. Thank you!

              Show
              fred Frédéric Massart added a comment - Thanks guys. I still had some issues testing this using ngrok , but a brief test on prototype seemed to prove that the solution worked, or at least did not cause any obvious regression. So Marina, Raj and myself decided to pass this test. Thank you!
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Closing as fixed, many thanks for all the hard work!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for all the hard work!
              Hide
              mebenson Melissa Benson added a comment - - edited

              In Moodle 2.7.2+ I'm using the attached package and uploading it..it says "activity loading, please wait..." and never loads. So #2 test is failing for me while test #1 is working....

              sorry, this was because of mixed active content (http and https). working now for me.

              Show
              mebenson Melissa Benson added a comment - - edited In Moodle 2.7.2+ I'm using the attached package and uploading it..it says "activity loading, please wait..." and never loads. So #2 test is failing for me while test #1 is working.... sorry, this was because of mixed active content (http and https). working now for me.
              Hide
              tsala Helen Foster added a comment -

              Dan, I notice you have labelled this issue as qa_test_required. Is it OK to have a QA test based on the issue testing instructions i.e. using the secure.testcraft.com URL and the attached AICC package?

              Show
              tsala Helen Foster added a comment - Dan, I notice you have labelled this issue as qa_test_required. Is it OK to have a QA test based on the issue testing instructions i.e. using the secure.testcraft.com URL and the attached AICC package?
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              I have just tested this and seems the link is still working, so created MDLQA-8720.

              In future if url stops working then we can remove the QA test.

              Show
              rajeshtaneja Rajesh Taneja added a comment - I have just tested this and seems the link is still working, so created MDLQA-8720 . In future if url stops working then we can remove the QA test.

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Sep/14