Skip to content

Commit

Permalink
Merge pull request #1478 from adaptlearning/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
brian-learningpool authored Jan 24, 2017
2 parents 8e101e5 + cca3376 commit 81c2622
Show file tree
Hide file tree
Showing 71 changed files with 1,819 additions and 608 deletions.
23 changes: 16 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
---
language: node_js
node_js:
- '4.2'
- "4"
- "5"
- "6"

sudo: required

env:
- CXX=g++-4.8

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

branches:
only:
- master
Expand All @@ -16,13 +28,11 @@ git:
services:
- mongodb

cache:
directories:
- node_modules

before_install:
- npm install -g npm
- git --version
- mongod --version
- npm install -g adapt-cli
- adapt --version

install:
- npm config set spin false
Expand All @@ -37,4 +47,3 @@ notifications:
- https://webhooks.gitter.im/e/984c2f87fa167719344b
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@ This project adheres to [Semantic Versioning](http://semver.org/).

**IMPORTANT**: For information on how to *correctly* update your installation, consult [INSTALL.md](https://github.com/adaptlearning/adapt_authoring/blob/master/INSTALL.md#updating-the-tool).

## [0.3.0] - 2017-01-24

### Added
- User management
- Can add users
- Can edit existing users (email, password, tenant, role, unlock locked accounts)
- Can disable/restore users
- Can delete users
- Add option to disable automatic switching-on of accessibility on touch devices
- Mailer now supports HTML templated emails
- User's roles now displayed on their profile page

### Changed
- Asset description is no longer a required field
- Updated config.json with up-to-date values
- Permissions page styled to match UI refresh
- Travis CI configuration updated:
- Added Node.js version 4, 5 and 6
- git, mongodb and adapt versions logged to console
- Removed caching for `node_modules` directory
- Removed `on_start` from notifications as Travis WebLint shows as deprecated

### Fixed
- Block alignment in page editor
- Password reset emails now work as intended
- The 'enabled' checkbox in Plugin Management now hides plugins from editor
- Removed tab/newline chars from CKEditor output to fix tabbing in published courses
- Menu picker selected colouring
- Notify content is now scrollable, rather than being rendered off screen

## [0.2.2] - 2016-09-13

### Added
Expand Down Expand Up @@ -262,7 +292,8 @@ If upgrading from a previous version, please add the following keys to your conf
- Loading screen of death
- Session cookie security issues


[0.3.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.2.2...v0.3.0
[0.2.2]: https://github.com/adaptlearning/adapt_authoring/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.1.7...v0.2.0
[0.1.7]: https://github.com/adaptlearning/adapt_authoring/compare/v0.1.6...v0.1.7
Expand Down
26 changes: 17 additions & 9 deletions conf/config-sample.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
{
"root": "",
"dataRoot": "data",
"rootUrl": "http://localhost:5000/",
"sessionSecret": "your-session-secret",
"outputPlugin": "adapt",
"auth": "local",
"isProduction": true,
"serverName": "localhost",
"serverPort": 3000,
"serverPort": 5000,
"dbType": "mongoose",
"dbName": "adapt-tenant-master",
"dbHost": "localhost",
"dbName": "adapt-builder-core",
"dbPort": 27017,
"dataRoot": "data",
"tenantPrefix": "adapt-builder-tenant-",
"sessionSecret": "your-secret-here",
"auth": "local",
"useffmpeg" : false,
"outputPlugin" : "adapt"
}
"useSmtp": false,
"smtpService": "",
"smtpUsername": "",
"smtpPassword": "",
"fromAddress": "",
"masterTenantName": "adapt-tenant-master",
"masterTenantID": ""
}
18 changes: 17 additions & 1 deletion frontend/src/core/app/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ define(function(require){
}
},

ifMailEnabled: function(block) {
if (Origin.constants.useSmtp === true) {
return block.fn(this);
} else {
return block.inverse(this);
}
},

getAssetFromValue: function(url) {
var urlSplit = url.split('/')
var fileName = urlSplit[urlSplit.length - 1];
Expand Down Expand Up @@ -348,8 +356,16 @@ define(function(require){
if (isConfirmed) {
Origin.trigger('editor:courseValidation');
}
},

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,}))$/;
if (value.length === 0 || !regEx.test(value)) {
return false;
} else {
return true;
}
}

};

for(var name in helpers) {
Expand Down
39 changes: 25 additions & 14 deletions frontend/src/core/app/less/permissions.less
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
@import '../../../less/sharedStyles.less';
@import '../../../less/variables.less';

.permissions {
.form-container-style;
text-align:center;
&-inner {
padding:30px;
}
top: 20px;
position: relative;

h1 {
font-size:21px;
}
}
> .inner {
padding: 40px;

.permissions-icon i {
font-size:56px;
color:#ff5567;
}
.permissions-icon i {
font-size:56px;
color:@alert-color;
}

.title {
margin: 20px 0;
font-size: 16px;
font-weight: 600;
}

.permissions-title {
margin-top:20px;
}
.body {
.inner {
margin-bottom: 20px;
}
}
}
}
21 changes: 8 additions & 13 deletions frontend/src/core/app/templates/permissions.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<div class="permissions-inner">

<div class="inner">
<div class="permissions-icon">
<i class="fa fa-space-shuttle"></i>
<i class="fa fa-ban"></i>
</div>

<div class="permissions-body">
<h1 class="permissions-body-inner">
Access Denied
</h1>
<div class="title">
{{t 'app.errorpagenoaccesstitle'}}
</div>

<div class="permissions-body">
<div class="permissions-body-inner">
Seems you don't have the correct permissions to view this page. Would you like to return to the <a href="#/dashboard">Dashboard?</div>
<div class="body">
<div class="inner">
{{t 'app.errorpagenoaccess'}}
</div>
<a href="#/dashboard" class="btn primary">{{t 'app.dashboard'}}</a>
</div>

</div>
30 changes: 6 additions & 24 deletions frontend/src/core/assetManagement/assetManagement.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE
define(function(require) {

var Origin = require('coreJS/app/origin');
var AssetModel = require('coreJS/assetManagement/models/assetModel');
var AssetCollection = require('coreJS/assetManagement/collections/assetCollection');
Expand All @@ -15,7 +14,6 @@ define(function(require) {
Origin.assetManagement.filterData = {};

if (!location) {

var tagsCollection = new TagsCollection();

tagsCollection.fetch({
Expand All @@ -32,36 +30,21 @@ define(function(require) {
error: function() {
console.log('Error occured getting the tags collection - try refreshing your page');
}
})



});
} else if (location=== 'new') {
Origin.trigger('location:title:update', {title: 'New Asset'});
Origin.sidebar.addView(new AssetManagementNewAssetSidebarView().$el, {
"backButtonText": "Back to assets",
"backButtonRoute": "/#/assetManagement"
});
Origin.sidebar.addView(new AssetManagementNewAssetSidebarView().$el);
Origin.router.createView(AssetManagementNewAssetView, { model: new AssetModel });
} else if (subLocation === 'edit') {

var Asset = new AssetModel({
_id: location
});
var Asset = new AssetModel({ _id: location });
// Fetch existing asset model
Asset.fetch({
success: function() {
Origin.trigger('location:title:update', {title: 'Edit Asset'});
Origin.sidebar.addView(new AssetManagementNewAssetSidebarView().$el, {
"backButtonText": "Back to assets",
"backButtonRoute": "/#/assetManagement"
});
Origin.router.createView(AssetManagementNewAssetView, {
model: Asset
});
Origin.sidebar.addView(new AssetManagementNewAssetSidebarView().$el);
Origin.router.createView(AssetManagementNewAssetView, { model: Asset });
}
})

});
}
});

Expand All @@ -80,5 +63,4 @@ define(function(require) {
Origin.on('app:dataReady login:changed', function() {
Origin.globalMenu.addItem(globalMenuObject);
});

});
43 changes: 23 additions & 20 deletions frontend/src/core/assetManagement/less/assetManagementNew.less
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
.asset-management-new-asset-inner {
padding:30px;
}

.progress-container {
width:100px;
height:15px;
border:1px solid black;
visibility:hidden;
position:relative;
}
@import '../../../less/sharedStyles.less';
@import '../../../less/variables.less';

.progress-bar {
width:0%;
background-color:lightgray;
height:100%;
}
.asset-management-new-asset {
.form-container-style;

.progress-percent {
color:black;
position:absolute;
display:inline-block;
.progress-container {
position:relative;
visibility:hidden;
width:76px;
height:10px;
background-color: white;
border:1px solid black;
overflow: hidden;
border-radius: 8px;
margin: 10px 0;
.progress-bar {
width:0%;
background-color: @primary-color;
height:100%;
.progress-percent {
display: none;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="asset-management-new-asset-inner">
<div class="asset-management-new-asset-inner inner">
<!-- Begin upload form -->
<form class="asset-form forms asset-form" action="/api/asset" method="post">
<div class="form-group">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<div class="sidebar-item-inner">
<div class="sidebar-item-inner">
<div class="separator"></div>

<button type="submit" class="primary-color asset-management-new-sidebar-save-button action-primary">
<span>
{{!-- <i class="fa fa-save"></i> --}}{{t 'app.save'}}
</span>
<span>{{t 'app.save'}}</span>
</button>

<button type="button" class="asset-management-new-sidebar-cancel-button action-secondary">
<span>
{{!-- <i class="fa fa-close"></i> --}}{{t 'app.cancel'}}
</span>
<span>{{t 'app.cancel'}}</span>
</button>
</div>

This file was deleted.

Loading

0 comments on commit 81c2622

Please sign in to comment.