Skip to content

Commit

Permalink
Release v0.11.2 (#2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylortom committed Sep 25, 2023
2 parents 8d75731 + bdc1e19 commit e0952e0
Show file tree
Hide file tree
Showing 10 changed files with 8,054 additions and 4,193 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to the Adapt authoring tool are documented in this file.
**IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.<br/>
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._

## [0.11.2] - 2023-09-25

Bugfix release.

### Fixed
- Framework core `_globals._extensions` missing from editor ([#2691](https://github.com/adaptlearning/
adapt_authoring/issues/2691))
- `_globals._extensions` form elements incorrectly rendered ([#2693](https://github.com/adaptlearning/
adapt_authoring/issues/2693))
- Force rebuild isn't run for new courses ([#2696](https://github.com/adaptlearning/2696))
- Imported course doesn't set correct ownership ([#2697](https://github.com/adaptlearning/2697))

### Added
- Scaffold should infer input type from schema type if no inputType has been specified ([#2700](https://github.com/adaptlearning/2700))

## [0.11.1] - 2022-12-02

Bugfix release.
Expand Down Expand Up @@ -758,6 +773,7 @@ Initial release.
- Loading screen of death
- Session cookie security issues

[0.11.2]: https://github.com/adaptlearning/adapt_authoring/compare/v0.11.1...v0.11.2
[0.11.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.11.0...v0.11.1
[0.11.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.5...v0.11.0
[0.10.5]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.4...v0.10.5
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Adapt Authoring Tool

[![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)

Adapt is a free and easy to use framework and authoring tool that creates fully responsive, multi-device, HTML5 e-learning content.

## What Does It Do?
Expand Down
15 changes: 12 additions & 3 deletions frontend/src/modules/scaffold/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,21 @@ define([
if (itemsProperties && Backbone.Form.editors[itemsInputType]) {
return itemsInputType;
}

if (fieldType === 'array') {
return 'List';
switch (fieldType) {
case 'array':
return 'List';
case 'boolean':
return 'Checkbox';
case 'number':
return 'Number';
case 'object':
return 'Object';
case 'string':
return 'Text';
}
};


var getValidators = function() {
var validators = field.validators || [];

Expand Down
3 changes: 2 additions & 1 deletion frontend/src/modules/scaffold/schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ define([ 'core/origin', './models/schemasModel' ], function(Origin, SchemasModel

// remove unrequired globals from the course
function trimGlobals(schema) {
var corePlugins = [{ targetAttribute: '_drawer' }, { targetAttribute: '_navigation' }]; // HACK to make sure core 'extensions' are included
var globals = schema._globals.properties;
trimDisabledPlugins(globals._extensions, _.values(configModel.get('_enabledExtensions')));
trimDisabledPlugins(globals._extensions, corePlugins.concat(_.values(configModel.get('_enabledExtensions'))));
trimDisabledPlugins(globals._menu, editorData.menutypes.where({ name: configModel.get('_menu') }));
trimDisabledPlugins(globals._theme, editorData.themetypes.where({ name: configModel.get('_theme') }));
// trim off the empty globals objects
Expand Down
14 changes: 11 additions & 3 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,14 @@ Origin.prototype.createServer = function (options, cb) {
server.use(session({
key: 'connect.sid',
secret: app.configuration.getConfig('sessionSecret'),
store: new MongoStore({ uri: db.conn.connectionUri }),
store: new MongoStore({
uri: db.conn.connectionUri,
connectionOptions: {
domainsEnabled: true,
useNewUrlParser: true,
useUnifiedTopology: true
}
}),
resave: true,
cookie: {
signed: true,
Expand All @@ -284,9 +291,10 @@ Origin.prototype.createServer = function (options, cb) {
requestDomain.add(res);
requestDomain.session = req.session;
requestDomain.on('error', next);
requestDomain.enter();
requestDomain.run(next);
// requestDomain.enter();
// requestDomain.run(next());
next();
// next();
});
server.use(auth.initialize());
server.use(auth.session());
Expand Down
9 changes: 9 additions & 0 deletions lib/contentmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,15 @@ ContentManager.prototype.setupRoutes = function () {
logger.log('error', err);
return next(err);
}
// HACK to include core extensions globals schema and add titles
const coreExtensionsGlobals = that._contentSchemas.course.properties._globals.properties?._extensions?.properties;
if(coreExtensionsGlobals) {
Object.assign(schemas.course._globals.properties._extensions.properties, coreExtensionsGlobals);
schemas.course._globals.properties._extensions.title = "Extensions";
}

schemas.course._globals.properties._components.title = "Components";

res.status(200).json(schemas);
});
});
Expand Down
2 changes: 1 addition & 1 deletion lib/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ exports = module.exports = {
if(this.shouldIgnore(req.url)) {
return next(); // route has been explicitly ignored somewhere
}
const user = app.usermanager.getCurrentUser();
const user = app.usermanager.getCurrentUser() || JSON.parse(JSON.stringify(req.session.passport.user));

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

0 comments on commit e0952e0

Please sign in to comment.