SCORM packages not available after upgrade 2.4.1->3.1.2

SCORM packages not available after upgrade 2.4.1->3.1.2

by Arkadiusz Baryła -
Number of replies: 5

Hello,

Recently, I got an assigment to upgrade an outdated Moodle platform to the latest version.
From version 2.4.1 -> 3.1.2.
To version 2.9.8 everything went smoothly, no major problems just only just no compatibility with some outdated plugins.

Real problems arose after upgrading from 2.9.8 to 3.0 and higher.

All courses containing SCORM packages, are not available, I have the following error.


Debug info: Unknown column 'sortorder' in 'order clause'
SELECT * FROM mdl_scorm_scoes WHERE scorm = ? ORDER BY sortorder, id
[array (
0 => '598',
)]
Error code: dmlreadexception
Stack trace:
line 474 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1088 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1356 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1307 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
line 713 of /mod/scorm/locallib.php: call to moodle_database->get_records()
line 1255 of /mod/scorm/locallib.php: call to scorm_grade_user_attempt()
line 157 of /mod/scorm/view.php: call to scorm_get_attempt_status()


I've been trying to resolve this problem on internet without any luck. Can some help me with this issue?

Attachment debug-info-moodle-erro.png
Average of ratings: -
In reply to Arkadiusz Baryła

Re: SCORM packages not available after upgrade 2.4.1->3.1.2

by Ken Task -
Picture of Particularly helpful Moodlers

Haven't run into the same issue ... so the following some sluething ....

Debug info shows: Unknown column 'sortorder'  in 'order clause'

mysql> show columns from mdl_scorm_scoes;

Should show a 'sortorder' column.


line 157 of /moodlecode/mod/scorm/view.php
is a 'require' line.   File must be present to continue.

require($CFG->dirroot . '/mod/scorm/tabs.php');

Is there a moodlecode/mod/scorm/tabs.php file?  and are the ownerships/permissions such that web server user can see it.

'spirit of sharing', Ken


In reply to Ken Task

Odp: Re: SCORM packages not available after upgrade 2.4.1->3.1.2

by Arkadiusz Baryła -

Hi Ken, thanks for the reply.

I've manage to isolate the problem. There was a missing column 'sortorder' in table mdl_scorm_scores. When I added it, based on clean moodle installation, the issue is gone.


Now I'm wondering about the situation, if the missing column was in one table the problem might occur elsewhere.

In reply to Arkadiusz Baryła

Re: Odp: Re: SCORM packages not available after upgrade 2.4.1->3.1.2

by Ken Task -
Picture of Particularly helpful Moodlers

Great!   Glad to hear you've resolved it.

When upgrading a Moodle and hyperjumping .... you did 2.4.1 -> 3.1.2 directly ... there is always that potential issue.   Changes in code affects DB (obviously) - which is why I've found it to be 'safer' to 'march a moodle' via git.   Don't keep older versions of Moodle DB's in order to check when those changes take place, so can't say for 100% certain, but do know experience, have 0 or fewer issues when arriving at destination version after 'marching'.

In the case when moving upwards to another series 2.x to 3.x the chance might be greater.

When first investigating your issue with systems to which I have access, one thing did stand out .... the actual naming of the table .... mdl_scorm_scores was actually called mdl_scorm_scoes (no 'r' in the latter).

Other tables missing columns?   Hope not, for your sake, but ... at least now you've been through the investigation of one such issue and could replicate those steps ... as well as solution ... to solve it - *IF* you hit one. ;)

'spirit of sharing', Ken


In reply to Ken Task

Odp: Re: Odp: Re: SCORM packages not available after upgrade 2.4.1->3.1.2

by Arkadiusz Baryła -

I thought that there may be problems with such a big update jump. So I was updating the platform one after the other (2.4-> 2.5, 2.5-> 2.6, etc., took some time to do it smile ), up to version 3.1.2.

Nevertheless, this did not prevent me from trouble sad, but the important point is that I managed to solve them without major losses. smile

In reply to Arkadiusz Baryła

Re: Odp: Re: Odp: Re: SCORM packages not available after upgrade 2.4.1->3.1.2

by Ken Task -
Picture of Particularly helpful Moodlers

Well, have 4 sites which I've helped manage since their initial migration from 1.9.highest to 2.x via git all of which use SCORM as their primary tool.   No reported issues yet.   They are all at 2.9.highest right now and will be upgrading them to 3.0.highest this weekend.    So we'll see if there are any issues.   Have checked the DB's for all sites and doesn't appear to be any columns missing.  If I run into something, will share back.

'spirit of sharing', Ken