adapt-security / adapt-authoring-adaptframework Goto Github PK
View Code? Open in Web Editor NEWAdapt framework integration for the Adapt authoring tool
Adapt framework integration for the Adapt authoring tool
Should return plugins defined in the manifest. AdaptFrameworkModule#getManifestPlugins
will need to be amended.
The build folder is currently used
All tool packages using latest code. Adapt framework installed in tool is 5.31.12.
Importing a 5.31.12 source zip file produces following errors:
Import of framework course failed, Import of framework content failed, article a-15 /_assessment/_attempts must be number, ; graphic-component c-25 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-62 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-72 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-95 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-105 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-115 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-125 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-135 /_graphic must have required property 'large', /_graphic must have required property 'small', ; graphic-component c-145 /_graphic must have required property 'large', /_graphic must have required property 'small',
I expect these issues should be resolved in the framework (i.e. https://github.com/adaptlearning/adapt_framework/tree/master/src/course/en)
No response
See above
master
No response
No response
No response
...to export metadata
The framework's build cache is currently broken and therefore has been disabled.
Currently the adapt-cli uses the OS temp folder to store the cache path. This can result in EPERM
errors when running multiple instances under different users on the same server (as cache dir is created & owned by the first user to build a course).
cacheManager.cachePath(
cwd, options.out, buildConfig.cachepath);
cachePath(basePath, outputFilePath = process.cwd(), configuredCachePath) {
const projectHash = CacheManager.hash(path.join(basePath, outputFilePath));
const cachePath = path.join(configuredCachePath || this.tempPath, `${projectHash}.cache`);
return cachePath;
}
2 API errors occur when attempting to include a tag during the framework import process.
Upon completion of the framework import, the tag is not added to the imported course. The 2 errors appear in the logs:
2022-04-21T15:03:48.758Z error server {"code":"ENDPOINT_NOT_FOUND","statusCode":404,"meta":{"description":"API endpoint does not exist","data":{"endpoint":"The missing endpoint"}},"data":{"endpoint":"/api/autocomplete/tag?term=Imported"}}
2022-04-21T15:03:48.932Z error server {"code":"ENDPOINT_NOT_FOUND","statusCode":404,"meta":{"description":"API endpoint does not exist","data":{"endpoint":"The missing endpoint"}},"data":{"endpoint":"/api/content/tag"}}
Steps to reproduce:
When importing a course a summary pops up to show what's being imported, this currently shows 0 for all items being imported (course, article, block etc).
No response
Import a course, view summary.
Latest
No response
No response
No response
We currently load this ourselves, but should switch to the CLI's API.
Allow courses to be edited, imported and exported in multiple languages.
When importing a course if any of the plugins being imported are already in the tool the import fails with the below error visible in the tool:
And the below errors in the console:
2024-01-09T12:31:51.080Z error adaptframework PLUGIN_IMPORT_FAILED C:\Working-AuthoringTool\240104\adapt-authoring\APP_DATA\temp\file-uploads\f3fa00c24854b0bd1cd945313_unzip\src\menu\adapt-contrib-boxMenu AdaptError: CONTENTPLUGIN_INSTALL_FAILED
at Object.get [as CONTENTPLUGIN_INSTALL_FAILED] (file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-errors/lib/ErrorsModule.js:50:20)
at ContentPluginModule.installPlugins (file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-contentplugin/lib/ContentPluginModule.js:246:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-adaptframework/lib/AdaptFrameworkImport.js:463:34
at async Promise.all (index 0)
at async AdaptFrameworkImport.importCoursePlugins (file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-adaptframework/lib/AdaptFrameworkImport.js:453:7)
at async AdaptFrameworkImport.import (file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-adaptframework/lib/AdaptFrameworkImport.js:221:9)
at async importHandler (file:///C:/Working-AuthoringTool/240104/adapt-authoring/node_modules/adapt-authoring-adaptframework/lib/AdaptFrameworkUtils.js:219:24) {
code: 'CONTENTPLUGIN_INSTALL_FAILED',
statusCode: 500,
meta: {
description: 'Installation of plugins failed',
data: { errors: 'List of errors' }
},
data: { errors: [ [AdaptError] ] }
}
No response
Import any course with a plugin already loaded into the tool
latest master
5.33.13
Firefox
No response
Some error codes are prefixed with FW, while others aren't, so we need to choose one or the other for consistency (think we should probably go with prefixing all with FW)
Attempt to import a v5.28.1 framework course
Zip contains grunt, src/core, src/course, and standard top level files (exact zip can be provided if necessary).
Tool states course can be imported, but on attempt to do so the following error appears:
Import of framework content failed,
graphic-component c-25 /_graphic must have required property 'large',
/_graphic must have required property 'small', ; blank-component c-60
must have required property '_component', ; graphic-component c-62
/_graphic must have required property 'large', /_graphic must have
required property 'small', ; graphic-component c-72 /_graphic must have
required property 'large', /_graphic must have required property
'small', ; blank-component c-90 must have required property
'_component', ; graphic-component c-95 /_graphic must have required
property 'large', /_graphic must have required property 'small', ;
blank-component c-100 must have required property '_component', ;
graphic-component c-105 /_graphic must have required property 'large',
/_graphic must have required property 'small', ; blank-component c-110
must have required property '_component', ; graphic-component c-115
/_graphic must have required property 'large', /_graphic must have
required property 'small', ; blank-component c-120 must have required
property '_component', ; graphic-component c-125 /_graphic must have
required property 'large', /_graphic must have required property
'small', ; blank-component c-130 must have required property
'_component', ; graphic-component c-135 /_graphic must have required
property 'large', /_graphic must have required property 'small', ;
blank-component c-140 must have required property '_component', ;
graphic-component c-145 /_graphic must have required property 'large',
/_graphic must have required property 'small'
No response
See above
master (12/05/2023)
No response
No response
No response
So can be removed for the security conscious (as it requires access to the list of user records), and also in the fairly likely case that we want to change the feature later.
Would require amending the course.schema.json
file
Although the src is correctly moved to the temp framework dir, the original temp upload dir is referenced in adapt.json.
Need to look into what issues this is likely to cause, and what the correct value should be.
App currently hangs and never finishes booting (have a suspicion it's the contentplugin mod/CLI). Think this would be useful at least for dev/debug purposes.
Issue applies to both plugin install & schema retrieval.
By a chance, I opened the link of a course preview on incognito tab and noticed that it can be accessible without logging into authoring tool.
I am not sure if it is a new feature...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.