Skip to content

Commit e0952e0

Browse files
authored
Release v0.11.2 (#2705)
2 parents 8d75731 + bdc1e19 commit e0952e0

File tree

10 files changed

+8054
-4193
lines changed

10 files changed

+8054
-4193
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to the Adapt authoring tool are documented in this file.
55
**IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.<br/>
66
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._
77

8+
## [0.11.2] - 2023-09-25
9+
10+
Bugfix release.
11+
12+
### Fixed
13+
- Framework core `_globals._extensions` missing from editor ([#2691](https://github.com/adaptlearning/
14+
adapt_authoring/issues/2691))
15+
- `_globals._extensions` form elements incorrectly rendered ([#2693](https://github.com/adaptlearning/
16+
adapt_authoring/issues/2693))
17+
- Force rebuild isn't run for new courses ([#2696](https://github.com/adaptlearning/2696))
18+
- Imported course doesn't set correct ownership ([#2697](https://github.com/adaptlearning/2697))
19+
20+
### Added
21+
- Scaffold should infer input type from schema type if no inputType has been specified ([#2700](https://github.com/adaptlearning/2700))
22+
823
## [0.11.1] - 2022-12-02
924

1025
Bugfix release.
@@ -758,6 +773,7 @@ Initial release.
758773
- Loading screen of death
759774
- Session cookie security issues
760775

776+
[0.11.2]: https://github.com/adaptlearning/adapt_authoring/compare/v0.11.1...v0.11.2
761777
[0.11.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.11.0...v0.11.1
762778
[0.11.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.5...v0.11.0
763779
[0.10.5]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.4...v0.10.5

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Adapt Authoring Tool
22

3-
[![Build Status](https://secure.travis-ci.org/adaptlearning/adapt_authoring.png)](http://travis-ci.org/adaptlearning/adapt_authoring) [![Join the chat at https://gitter.im/adaptlearning/adapt_authoring](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/adaptlearning/adapt_authoring?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4-
53
Adapt is a free and easy to use framework and authoring tool that creates fully responsive, multi-device, HTML5 e-learning content.
64

75
## What Does It Do?

frontend/src/modules/scaffold/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,21 @@ define([
6868
if (itemsProperties && Backbone.Form.editors[itemsInputType]) {
6969
return itemsInputType;
7070
}
71-
72-
if (fieldType === 'array') {
73-
return 'List';
71+
switch (fieldType) {
72+
case 'array':
73+
return 'List';
74+
case 'boolean':
75+
return 'Checkbox';
76+
case 'number':
77+
return 'Number';
78+
case 'object':
79+
return 'Object';
80+
case 'string':
81+
return 'Text';
7482
}
7583
};
7684

85+
7786
var getValidators = function() {
7887
var validators = field.validators || [];
7988

frontend/src/modules/scaffold/schemas.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ define([ 'core/origin', './models/schemasModel' ], function(Origin, SchemasModel
3636

3737
// remove unrequired globals from the course
3838
function trimGlobals(schema) {
39+
var corePlugins = [{ targetAttribute: '_drawer' }, { targetAttribute: '_navigation' }]; // HACK to make sure core 'extensions' are included
3940
var globals = schema._globals.properties;
40-
trimDisabledPlugins(globals._extensions, _.values(configModel.get('_enabledExtensions')));
41+
trimDisabledPlugins(globals._extensions, corePlugins.concat(_.values(configModel.get('_enabledExtensions'))));
4142
trimDisabledPlugins(globals._menu, editorData.menutypes.where({ name: configModel.get('_menu') }));
4243
trimDisabledPlugins(globals._theme, editorData.themetypes.where({ name: configModel.get('_theme') }));
4344
// trim off the empty globals objects

lib/application.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,14 @@ Origin.prototype.createServer = function (options, cb) {
270270
server.use(session({
271271
key: 'connect.sid',
272272
secret: app.configuration.getConfig('sessionSecret'),
273-
store: new MongoStore({ uri: db.conn.connectionUri }),
273+
store: new MongoStore({
274+
uri: db.conn.connectionUri,
275+
connectionOptions: {
276+
domainsEnabled: true,
277+
useNewUrlParser: true,
278+
useUnifiedTopology: true
279+
}
280+
}),
274281
resave: true,
275282
cookie: {
276283
signed: true,
@@ -284,9 +291,10 @@ Origin.prototype.createServer = function (options, cb) {
284291
requestDomain.add(res);
285292
requestDomain.session = req.session;
286293
requestDomain.on('error', next);
287-
requestDomain.enter();
294+
requestDomain.run(next);
295+
// requestDomain.enter();
288296
// requestDomain.run(next());
289-
next();
297+
// next();
290298
});
291299
server.use(auth.initialize());
292300
server.use(auth.session());

lib/contentmanager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,15 @@ ContentManager.prototype.setupRoutes = function () {
620620
logger.log('error', err);
621621
return next(err);
622622
}
623+
// HACK to include core extensions globals schema and add titles
624+
const coreExtensionsGlobals = that._contentSchemas.course.properties._globals.properties?._extensions?.properties;
625+
if(coreExtensionsGlobals) {
626+
Object.assign(schemas.course._globals.properties._extensions.properties, coreExtensionsGlobals);
627+
schemas.course._globals.properties._extensions.title = "Extensions";
628+
}
629+
630+
schemas.course._globals.properties._components.title = "Components";
631+
623632
res.status(200).json(schemas);
624633
});
625634
});

lib/permissions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ exports = module.exports = {
494494
if(this.shouldIgnore(req.url)) {
495495
return next(); // route has been explicitly ignored somewhere
496496
}
497-
const user = app.usermanager.getCurrentUser();
497+
const user = app.usermanager.getCurrentUser() || JSON.parse(JSON.stringify(req.session.passport.user));
498498

499499
if (!user || !user._id) {
500500
return res.status(403).json({ statusCode: STATUS.NOT_AUTHENTICATED });

0 commit comments

Comments
 (0)