Adapt Framework Version 6 Prototype
fixes https://github.com/adaptlearning/adapt_framework/issues/2526 fixes https://github.com/adaptlearning/adapt_framework/issues/2363
original issues https://github.com/adaptlearning/adapt_framework/issues/3044
What's changed?
- We have NPM install support for plugins via our normal registry server. The server is publically available for those who wish to host their own registries. A registry server can be setup to fallback to any other public npm registry. The default server fallback registry is to the npm public registry but it is possible to chain to the adapt registry which then chains to the npm one. Any plugins registered in the server should be installable via npm using the registry at https://adapt-bower-repository.herokuapp.com/npm/. With:
//.npmrc
registry=https://adapt-bower-repository.herokuapp.com/npm/
- The core has been broken into the following pieces: adapt-contrib-core Model/view registry, tracking, offlineStorage, fixes, logging and wait queues adapt-contrib-data Data loader, router, scrollto, location, startcontroller adapt-contrib-mpabc Menu, page, article, block and component interfaces adapt-contrib-a11y Accessibility layer adapt-contrib-device Device identification and breakpoints adapt-contrib-drawer Side drawer adapt-contrib-navigation Navigation adapt-contrib-notify Notify With adapt-contrib-tooltip yet to come.
- We've gotten rid of
src/coursein favour ofbuild/course - React, bower and semver are all now installed node modules.
- It will be possible to use (most/some) npm modules in courses moving forwards (tbc as to limitations).
- Most existing plugins should be compatible (tbc, with the addition or injection of a package.json)
Testing
- Run the following commands
git clone https://github.com/adaptlearning/adapt_framework v6-test
cd v6-test
git checkout issue/v6
cd src/
npm install
cd ../
npm install
grunt dev
- Once built, cancel the dev task with
ctrl+c, then run
grunt server
- Please have a look around and post any comments on this pr
Todo
- LESS: Much of the styling needs to be moved into the right extensions
- SCHEMAS: The grunt tasks do not yet apply defaults from the new AAT schemas, the old AAT schemas will not work with v6 without sustantial work but the new AAT schema styles should be able to do what's necessary, they have yet to be cleaned up and trimmed. We need to decide if v6 will support the classic AAT / vice-versa.
- adapt-cli is not yet compatible with v6 but the
adapt installcommand etc will be made v6 compatible https://github.com/adaptlearning/adapt-cli/issues/175 - grunt build
includesdo not yet work with dependent extensions, such that if resources is included but drawer is not, drawer will not yet be added to the construction phase
👏
Source install not currently working in Node v16:
$ npm i
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code E404
npm ERR! 404 Not Found - GET https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz
npm ERR! 404
npm ERR! 404 'scheduler@https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz' is not in this registry.
N.B. working fine in Node v14
Source install not currently working in Node v16:
$ npm i npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm ERR! code E404 npm ERR! 404 Not Found - GET https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz npm ERR! 404 npm ERR! 404 'scheduler@https://adapt-bower-repository.herokuapp.com/npm/scheduler/-/scheduler-0.20.2.tgz' is not in this registry.N.B. working fine in Node v14
Should be fixed for v16 now. Thanks for checking.
Able run through the install and for the most part working nicely. Getting the below issue when answering the 4th question on the question components page (c-62)
Uncaught TypeError: Cannot read properties of undefined (reading 'notFinal') at McqModel.setAttemptSpecificFeedback (QuestionModel.js:287:57) at McqModel.setupIncorrectFeedback (QuestionModel.js:283:10) at McqModel.setupFeedback (ItemsQuestionModel.js:160:10) at McqView.setupFeedback (QuestionView.js:514:18) at McqView._runModelCompatibleFunction (QuestionView.js:544:7) at McqView.onSubmitClicked (QuestionView.js:212:10) at McqView.onButtonStateUpdate (QuestionView.js:146:14) at p (backbone.min.js:2:3295) at v (backbone.min.js:2:3081) at u (backbone.min.js:2:902)
stupendous, thank's @joe-allen-89