Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.10.3 #2501

Merged
merged 29 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
903f6d0
Clear build folder on export and publish
canstudios-nicolaw Jan 8, 2020
9824ead
Move course validation to back-end for efficiency
canstudios-nicolaw Jan 9, 2020
741734d
Improve pluralisation
canstudios-nicolaw Jan 10, 2020
8c1abe2
Empty build dir on export/publish/force rebuild preview
canstudios-nicolaw Jan 10, 2020
79c7041
Handle undefined parents/children
canstudios-nicolaw Jan 13, 2020
3c45ccd
Always install latest compatible version of plugin
tomgreenfield Jan 14, 2020
86c0c39
Use schema for creation of framework elements
tomgreenfield Jan 14, 2020
9d5ac61
Remove hard-coded screen sizes
tomgreenfield Jan 15, 2020
fe4abb3
Switch to const
canstudios-nicolaw Jan 17, 2020
c94c8f2
Store function in variable
canstudios-nicolaw Jan 17, 2020
1c3122a
Merge pull request #2488 from CanStudios/issue/2442
tomgreenfield Jan 30, 2020
b6ff6cd
Merge pull request #2493 from adaptlearning/issue/2485
canstudios-nicolaw Feb 3, 2020
8c3aa98
Merge pull request #2492 from adaptlearning/issue/2481
canstudios-nicolaw Feb 3, 2020
9038313
Merge pull request #2491 from adaptlearning/issue/2479
canstudios-nicolaw Feb 3, 2020
4d9ce9b
Merge pull request #2489 from CanStudios/issue/2487
canstudios-nicolaw Feb 3, 2020
42a73ee
Catch stream error
tomgreenfield Feb 3, 2020
2d2fc94
Merge pull request #2497 from adaptlearning/issue/2486
tomgreenfield Feb 4, 2020
0655c2f
Prep for release
tomgreenfield Feb 4, 2020
822dcb7
Merge pull request #2499 from adaptlearning/changelog
tomgreenfield Feb 11, 2020
5725be7
Capitalise issue
tomgreenfield Feb 11, 2020
49da1c7
Add package-lock.json
tomgreenfield Feb 18, 2020
cb5f247
Add devDependencies to package-lock
tomgreenfield Feb 18, 2020
e35c61f
Switch to npm ci
tomgreenfield Feb 18, 2020
a0d384b
Course validation fix
tomgreenfield Feb 19, 2020
a5259e7
Destructure for succinctness
tomgreenfield Feb 19, 2020
0ba70e9
Merge pull request #2506 from adaptlearning/courseValidationFix
tomgreenfield Feb 19, 2020
d6e88bd
Merge pull request #2505 from adaptlearning/issue/2504
tomgreenfield Feb 19, 2020
ad5bf28
Update CHANGELOG
tomgreenfield Feb 19, 2020
58817e7
Mark issue 2301 as enhancement
tomgreenfield Feb 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/nbproject/
/master/

package-lock.json

/plugins/content/component/versions/
/plugins/content/component/componentcache/
/plugins/content/extension/versions/
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_install:

install:
- npm config set spin false
- npm install
- npm ci
- grunt build:prod

matrix:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ 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.10.3] - 2020-02-21

Bugfix release.

### Fixed
- Cannot remove Spoor's required files from published course ([#2235](https://github.com/adaptlearning/adapt_authoring/issues/2235))
- If I switch theme, the old theme assets still seem to be retained on publish ([#2442](https://github.com/adaptlearning/adapt_authoring/issues/2442))
- Incompatible versions of plugins are targetted if range specified in adapt.json ([#2479](https://github.com/adaptlearning/adapt_authoring/issues/2479))
- Framework and AT use different default screen sizes ([#2485](https://github.com/adaptlearning/adapt_authoring/issues/2485))
- Heavy course validation on front-end ([#2487](https://github.com/adaptlearning/adapt_authoring/issues/2487))

### Added
- Generate a dependency lock on release ([#2301](https://github.com/adaptlearning/adapt_authoring/issues/2301))

## [0.10.2] - 2019-11-08

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

[0.10.3]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.2...v0.10.3
[0.10.2]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.1...v0.10.2
[0.10.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.9.0...v0.10.0
Expand Down
31 changes: 0 additions & 31 deletions frontend/src/core/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,37 +228,6 @@ define(function(require){
return success;
},

// checks for at least one child object
validateCourseContent: function(currentCourse, callback) {
var containsAtLeastOneChild = true;
var alerts = [];
var iterateOverChildren = function(model, index, doneIterator) {
if(!model._childTypes) {
return doneIterator();
}
model.fetchChildren(function(currentChildren) {
if (currentChildren.length > 0) {
return helpers.forParallelAsync(currentChildren, iterateOverChildren, doneIterator);
}
containsAtLeastOneChild = false;
var children = _.isArray(model._childTypes) ? model._childTypes.join('/') : model._childTypes;
alerts.push(model.get('_type') + " '" + model.get('title') + "' missing " + children);
doneIterator();
});
};
// start recursion
iterateOverChildren(currentCourse, null, function() {
var errorMessage = "";
if(alerts.length > 0) {
for(var i = 0, len = alerts.length; i < len; i++) {
errorMessage += "<li>" + alerts[i] + "</li>";
}
return callback(new Error(errorMessage));
}
callback(null, true);
});
},

isValidEmail: function(value) {
var regEx = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return value.length > 0 && regEx.test(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ define(function(require) {
var newMenuItemModel = new ContentObjectModel({
_parentId: this._parentId,
_courseId: Origin.editor.data.course.get('_id'),
title: (type == 'page' ? Origin.l10n.t('app.placeholdernewpage') : Origin.l10n.t('app.placeholdernewmenu')),
displayTitle: (type == 'page' ? Origin.l10n.t('app.placeholdernewpage') : Origin.l10n.t('app.placeholdernewmenu')),
body: '',
linkText: Origin.l10n.t('app.view'),
graphic: { alt: '', src: '' },
_type: type
Expand Down Expand Up @@ -125,26 +122,20 @@ define(function(require) {
addNewPageArticleAndBlock: function(model, newMenuItemView) {
var typeToAdd;
var newChildModel;
var newChildTitle;
this.pageModel;
this.pageView;

if (model.get('_type') === 'page') {
this.pageModel = model;
this.pageView = newMenuItemView;
typeToAdd = 'article';
newChildTitle = Origin.l10n.t('app.placeholdernewarticle');
var newChildModel = new ArticleModel();
} else {
typeToAdd = 'block';
newChildTitle = Origin.l10n.t('app.placeholdernewblock');
var newChildModel = new BlockModel();
}

newChildModel.save({
title: newChildTitle,
displayTitle: (typeToAdd == 'block') ? '' : newChildTitle,
body: '',
_parentId: model.get('_id'),
_courseId: Origin.editor.data.course.get('_id')
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ define(function(require){
event && event.preventDefault();
var model = new BlockModel();
model.save({
title: Origin.l10n.t('app.placeholdernewblock'),
displayTitle: Origin.l10n.t('app.placeholdernewblock'),
body: '',
_parentId: this.model.get('_id'),
_courseId: Origin.editor.data.course.get('_id'),
layoutOptions: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ define(function(require) {
var model = new ComponentModel();

model.save({
title: Origin.l10n.t('app.placeholdernewcomponent'),
displayTitle: Origin.l10n.t('app.placeholdernewcomponent'),
body: '',
_parentId: this._parentId,
_courseId: Origin.editor.data.course.get('_id'),
_type: 'component',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ define(function(require){
addNewArticle: function(event) {
event && event.preventDefault();
(new ArticleModel()).save({
title: Origin.l10n.t('app.placeholdernewarticle'),
displayTitle: Origin.l10n.t('app.placeholdernewarticle'),
body: '',
_parentId: this.model.get('_id'),
_courseId: Origin.editor.data.course.get('_id'),
_type:'article'
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/modules/editor/course/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ define(function(require) {
}

function createNewCourse() {
var model = new CourseModel({
title: Origin.l10n.t('app.placeholdernewcourse'),
displayTitle: Origin.l10n.t('app.placeholdernewcourse')
});
var model = new CourseModel();
Origin.trigger('location:title:update', {
breadcrumbs: ['dashboard'],
title: Origin.l10n.t('app.editornew')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ define(function(require) {

createGenericPage: function(courseModel) {
var contentObjectModel = new ContentObjectModel({
title: Origin.l10n.t('app.placeholdernewpage'),
displayTitle: Origin.l10n.t('app.placeholdernewpage'),
_type: 'page',
_courseId: courseModel.get('_id'),
_parentId: courseModel.get('_id')
Expand Down
28 changes: 3 additions & 25 deletions frontend/src/modules/editor/global/views/editorView.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,12 @@ define(function(require) {
'editorView:copy': this.addToClipboard,
'editorView:copyID': this.copyIdToClipboard,
'editorView:paste': this.pasteFromClipboard,
'editorCommon:download': function() {
this.validateProject(function(error) {
this.downloadProject();
});
},
'editorCommon:download': this.downloadProject,
'editorCommon:preview': function(isForceRebuild) {
var previewWindow = window.open('loading', 'preview');
this.validateProject(function(error) {
if(error) {
return previewWindow.close();
}
this.previewProject(previewWindow, isForceRebuild);
});
this.previewProject(previewWindow, isForceRebuild);
},
'editorCommon:export': function() {
this.validateProject(function(error) {
this.exportProject(error);
});
}
'editorCommon:export': this.exportProject
});
this.render();
this.setupEditor();
Expand All @@ -76,15 +63,6 @@ define(function(require) {
this.renderCurrentEditorView();
},

validateProject: function(next) {
helpers.validateCourseContent(this.currentCourse, _.bind(function(error) {
if(error) {
Origin.Notify.alert({ type: 'error', text: "There's something wrong with your course:<br/><br/>" + error });
}
next.call(this, error);
}, this));
},

previewProject: function(previewWindow, forceRebuild) {
if(Origin.editor.isPreviewPending) {
return;
Expand Down
12 changes: 3 additions & 9 deletions lib/installHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,20 +573,14 @@ function updateFrameworkPlugins(opts, callback) {
}
var plugins = Object.keys(json.dependencies);
async.eachSeries(plugins, function(plugin, pluginCallback) {
var _done = function(error) {
showSpinner(`Updating Adapt framework plugin '${plugin}'`);
app.bowermanager.installLatestCompatibleVersion(plugin, error => {
hideSpinner();
if(error) { // log, but don't fail (see #1890)
warn(`Failed to install ${plugin}, ${error}`);
}
pluginCallback();
};
showSpinner(`Updating Adapt framework plugin '${plugin}'`);

if(json.dependencies[plugin] === '*') {
app.bowermanager.installLatestCompatibleVersion(plugin, _done);
} else {
app.bowermanager.installPlugin(plugin, json.dependencies[plugin], _done);
}
});
}, function(error) {
hideSpinner();
if(error) {
Expand Down
Loading