Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #722 from h-da/develop
Browse files Browse the repository at this point in the history
Release version 0.7.0
  • Loading branch information
PatrickSkowronek committed May 5, 2018
2 parents a9cf062 + dd7dbd9 commit 3f84294
Show file tree
Hide file tree
Showing 226 changed files with 11,199 additions and 5,010 deletions.
2 changes: 1 addition & 1 deletion .docker/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8.9.0
FROM node:8.11.1

WORKDIR /usr/src/app

Expand Down
9 changes: 4 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
# How to Contribute?

## Project members

- Create an issue
- Create a branch for that issue with the naming:
`feature/{ticket-no}-{description-separated-by-dashes}`
- Develop your code
- Commit and push in regular intervalls
- Run the tests locally
- Add a line to the [CHANGELOG.md](https://github.com/h-da/geli/blob/develop/CHANGELOG.md) under the "NEXT" section in the form `- a short text to describe [#123](https://github.com/h-da/geli/issues/123)`
- Open a Pull-Request
- If CI/Coverage give their OK we can merge
- The PR gets merged to `develop`, which will push a new Docker-Image-Version with the tag `develop` and `latest`
- The staging-system will then be updated to the latest Image from Docker-Hub
- If we have enough features we will merge the `develop` into the `master` branch, which will add
a new 'stable' image on Docker-Hub.
a new 'stable' image on Docker-Hub. Before we do this, the new version needs to be updated in several `package.json`s and the `CHANGELOG.md`.
The livesysten then pulls that new image and starts up with the latest stable version

If we have bugfixes we create a `bugfix/{descriptive-name}` and open a PR, issues are not required
If we have small bugfixes we create a `bugfix/{descriptive-name}` and open a PR, issues are not required
for that. But it's important to have a good description of the bugfix in the PR-Comment.
If it is not a small bug please create a issue for it so we can decide the importance of it.


## Branching model

We are using a slightly modified [GitFlow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) branching strategy.


## Commit messages

Please adhere to the principles described [here](https://chris.beams.io/posts/git-commit/) for
writing commit messages.
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@

## Additional info:

------
_Please tag this issue if you are sure to which tag(s) it belongs._
<!--
ATTENTION:
Please tag this issue if you are sure to which tag(s) it belongs.
-->
8 changes: 5 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Closes #
## Known Issues:
_NONE_

------
_Remember to prefix your PR-Title with `⚠ WIP: ` if you still work on it.
If you have reached a final state, remove the prefix._
<!--
ATTENTION:
Remember to prefix your PR-Title with `⚠ WIP: ` if you still work on it.
If you have reached a final state, remove the prefix.
-->
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ install:
- cd ..

script:
# check for change in changelog
- .travis/changelog.sh
# check for versions
- .travis/check-version.sh
# run license checker and write license.json / dependencies.ts
Expand All @@ -74,11 +76,11 @@ script:
# run frontend-tests and return back to root for following steps
- cd app/webFrontend
- npm run lint # run linter
# - npm run test # run test - does not work properly
# - npm run test-ci || true # run test - many tests are broken
- npm run e2e # run end-to-end-tests
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/app/shared/services/raven-error-handler.service.ts
- cd ../..
- .travis/build-fe.sh # build in prod mode
- travis_wait 30 .travis/build-fe.sh # build in prod mode

after_script:
# send required files to coveralls.io
Expand Down
2 changes: 1 addition & 1 deletion .travis/apidoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [[ "$TRAVIS_BRANCH" == "master" ]] || [[ -n "$TRAVIS_TAG" ]]; then
git commit -m "Travis build: $TRAVIS_BUILD_NUMBER" &>/dev/null

if [[ -n "$TRAVIS_TAG" ]]; then
echo "+ git tag" ; git tag $TRAVIS_TAG
echo "+ git tag" ; git tag -a $TRAVIS_TAG -m "Release $TRAVIS_TAG"
else
echo -e "${YELLOW}+ skipping: git tag - not tagged build${NC}"
fi
Expand Down
44 changes: 44 additions & 0 deletions .travis/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# Path to this file
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Path the script was called from
IPWD="$(pwd)"
# Import shared vars
. ${DIR}/_shared-vars.sh

echo
echo "+++ Check if changelog was updated +++"
echo


if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "develop" ]; then
echo "+ detected pull request from ($TRAVIS_PULL_REQUEST_BRANCH) to $TRAVIS_BRANCH"
curl --silent https://raw.githubusercontent.com/h-da/geli/$TRAVIS_BRANCH/CHANGELOG.md \
| diff CHANGELOG.md - \
| grep -P '^< - .{8,}' - -q

if [[ $? == 0 ]]; then
echo -e "${GREEN}+ Update in CHANGELOG.md found, exit${NC}"
else
echo -e "${RED}+ ERROR: No Update in CHANGELOG.md found!"
echo -e "+ Please check if a line was added in the CHANGELOG.md.${NC}"
exit 1
fi
elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
echo "+ detected pull request from ($TRAVIS_PULL_REQUEST_BRANCH) to $TRAVIS_BRANCH"
curl --silent https://raw.githubusercontent.com/h-da/geli/$TRAVIS_BRANCH/CHANGELOG.md \
| diff CHANGELOG.md - \
| grep -P '^< ## \[\[\d{1,3}\.\d{1,3}\.\d{1,3}\].*\] - \d{4}-\d{2}-\d{2} - .{10,}' - -q

if [[ $? == 0 ]]; then
echo -e "${GREEN}+ Update in CHANGELOG.md found, exit${NC}"
else
echo -e "${RED}+ ERROR: No Update in CHANGELOG.md found!"
echo -e "+ Please check if a new version was added in the CHANGELOG.md."
echo -e "+ Or a new section for the next release was added${NC}"
exit 1
fi
else
echo -e "${YELLOW}+ WARNING: No Pull Request agiainst Develop or Master -> skipping automate changelog checking${NC}";
fi
2 changes: 1 addition & 1 deletion .travis/check-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IPWD="$(pwd)"
PATHS_TO_CHECK=("api" "app/webFrontend")

echo
echo "+++ Check if current version already used"
echo "+++ Check if current version already used +++"
echo

# If is PR against master
Expand Down
133 changes: 133 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!--
################################################################################
### PLEASE LINK THE ISSUES IF THERE IS ONE, OTHERWISE LINK THE PULL-REQUESTS ###
################################################################################
-->

## [NEXT]

## [[0.7.0](https://github.com/h-da/geli/releases/tag/v0.7.0)] - 2018-05-05 - SS 18 intermediate Release
### Added
- Added the possibility to sort all courses alphabetically. [#567](https://github.com/h-da/geli/issues/567)
- Added a box for information on the homescreen. [#216](https://github.com/h-da/geli/issues/216)
- Added an account activation resend feature. [#601](https://github.com/h-da/geli/issues/601)
- Added `SnackBarService` as wrapper for `MatSnackBar`. [#574](https://github.com/h-da/geli/issues/574)
- Added new course & user API unit tests. [#654](https://github.com/h-da/geli/issues/654) [#691](https://github.com/h-da/geli/issues/691)
- Added details of courseAdmin and teacher to course detail view. on click profiles are shown.[#598](https://github.com/h-da/geli/issues/598)
- Added small auto linting scripts to package.json [#688](https://github.com/h-da/geli/issues/688)
- Added changed size of drop down arrows for better usability. [#686](https://github.com/h-da/geli/issues/686)
- Added new contributors [#624](https://github.com/h-da/geli/issues/624)
- Added the date and the teacher under each unit [#582](https://github.com/h-da/geli/issues/582)
- Added E-Mail validation to reset password [#597](https://github.com/h-da/geli/issues/597)
- Added Language code to header [#554](https://github.com/h-da/geli/issues/554)
- Added icon for access key [#547](https://github.com/h-da/geli/issues/574)
- Unit visibility toggle [#582](https://github.com/h-da/geli/issues/582)

### Changed
- Refactored or slightly altered various course & user related APIs. [#654](https://github.com/h-da/geli/issues/654) [#691](https://github.com/h-da/geli/issues/691)
- Removed firstname from resend activation feature and change button positioning. [#711](https://github.com/h-da/geli/issues/711)
- Refactored register and resend activation to use geli email validator with top level domain check. [#713](https://github.com/h-da/geli/issues/713)
- Refactored the unitCreator with a forsafe user object. [#717](https://github.com/h-da/geli/pull/717)
- Changed the text in download course[#718](https://github.com/h-da/geli/pull/718)
- Removed firstname from resend activation feature and change button positioning. [#711](https://github.com/h-da/geli/issues/711)
- Refactored register and resend activation to use geli email validator with top level domain check. [#713](https://github.com/h-da/geli/issues/713)

### Fixed
- Fixed route `/users/roles` [#204](https://github.com/h-da/geli/issues/204)
- Fixed profile picture will be deleted after changing any other profile data [#504](https://github.com/h-da/geli/issues/504)
- Fixed some UI issues in create code kata unit [#543](https://github.com/h-da/geli/issues/543)
- Fixed reading wrong error message across the whole application [#572](https://github.com/h-da/geli/issues/572)
- Fixed admin can changed his own role [#606](https://github.com/h-da/geli/issues/606)
- Fixed a typo in admin panel [#533](https://github.com/h-da/geli/issues/533)
- Fixed an admin cannot delete any courses [#647](https://github.com/h-da/geli/issues/647)
- Fixed some issues with download a course [#659](https://github.com/h-da/geli/issues/659)
- Fixed an issue with deleting a course and the notification was not triggered [#642](https://github.com/h-da/geli/issues/543)
- Fixed Course progress mechanism [#593](https://github.com/h-da/geli/issues/593)
- Fixed wasteful course data usage via specialized course model interfaces. [#654](https://github.com/h-da/geli/issues/654)
- Fixed a broken documentation link. [#583](https://github.com/h-da/geli/issues/583)
- Limited the first and last name to 64 characters in the registration- and edit page. [#585](https://github.com/h-da/geli/issues/585)
- Added a correct email validator to the `user-edit` and `register` components. [#564](https://github.com/h-da/geli/issues/564)
- Upload of profile pictures now prevents files with forbidden extensions. [#581](https://github.com/h-da/geli/issues/581)
- Fixed empty course downloads. [#659](https://github.com/h-da/geli/issues/659)
- Videos in the course now get sized equally and can't grow too big in mobile views. [#534](https://github.com/h-da/geli/issues/534)
- Fixed missing background on the password reset page. [#673](https://github.com/h-da/geli/issues/673)
- Fixed notification icon spacing in the navbar for students. [#696](https://github.com/h-da/geli/issues/696)
- Repair Angular CLI code generation. [#701](https://github.com/h-da/geli/pull/701)
- Fixed `tsconfig.spec.ts` for `ng test`. [#656](https://github.com/h-da/geli/pull/656)
- Fixed `.travis.yml`. [#706](https://github.com/h-da/geli/pull/706)
- Fixed wording of progress display on profile page. [#715](https://github.com/h-da/geli/issues/715)
- Fixed form validator in create task [#579](https://github.com/h-da/geli/issues/579)
- Fixed Mongoose pre hook usage [#680](https://github.com/h-da/geli/issues/680) [#677](https://github.com/h-da/geli/issues/677)

### Security
- Fixed numerous severe user related security issues. [#691](https://github.com/h-da/geli/issues/691) [#709](https://github.com/h-da/geli/pull/709)
- Fixed multiple severe course related security issues. [#594](https://github.com/h-da/geli/issues/594) [#653](https://github.com/h-da/geli/issues/653) [#691](https://github.com/h-da/geli/issues/691)
- Updated the dependencies for security. [#661](https://github.com/h-da/geli/issues/661)

## [[0.6.0](https://github.com/h-da/geli/releases/tag/v0.6.0)] - 2018-03-31 - Introduces MediaManager and some minor changes
### Added
- MediaManager for file management in courses


## [[0.5.0](https://github.com/h-da/geli/releases/tag/v0.5.0)] - 2018-03-24 - WS 17/18 intermediate Release
### Added
- selective download of the course
- progress dashboard for teacher
- translateable frontend with i18n
- notification system added
- introduces new error message system
- dark theme option
- introducing an api documentation
- courses are ordered by last visit
- user password edit
- adds imprint


## [[0.4.0](https://github.com/h-da/geli/releases/tag/v0.4.0)] - 2017-12-04 - WS 17/18 Second feature release
### Added
- Responsivness improved
- leave course function
- delete course
- import/export course function
- free text mail to students
- dragging content between lectures
- consistent save and abort btns in units
- progress component
- duplication of lectures
- randomize tasks after validation


## [[0.3.1](https://github.com/h-da/geli/releases/tag/v0.3.1)] - 2017-11-05 - Dynamic db name update
### Added
- The possibility to use a other database name then 'test'


## [[0.3.0](https://github.com/h-da/geli/releases/tag/v0.3.0)] - 2017-11-02
### Added
- a lot of major bugfixes and optimizations


## [[0.2.2](https://github.com/h-da/geli/releases/tag/v0.2.2)] - 2017-10-19 - Security improvements
### Added
- security for free courses


## [[0.2.1](https://github.com/h-da/geli/releases/tag/v0.2.1)] - 2017-10-03 - First Live-Ready release
### Added
- first live functionality


## [[0.2.0](https://github.com/h-da/geli/releases/tag/v0.2.0)] - 2017-06-29 - Almost production ready
### Added
- Many new feature for production


## [[0.1.0](https://github.com/h-da/geli/releases/tag/v0.1.0)] - 2017-05-11 - Basics implemented
### Added
- Many basic implementations of ground functionality
4 changes: 2 additions & 2 deletions api/fixtures/FixtureLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class FixtureLoader {
(<any>mongoose).Promise = global.Promise;

if (!mongoose.connection.readyState) {
mongoose.connect(config.database, {useMongoClient: true});
mongoose.connect(config.database);
}
}

Expand Down Expand Up @@ -78,7 +78,7 @@ export class FixtureLoader {

for (const file of files) {
if (!fs.existsSync(file.path) && fs.existsSync(this.binaryDirectory + file.alias)) {
fs.copyFileSync(this.binaryDirectory + file.alias, file.path)
fs.copyFileSync(this.binaryDirectory + file.alias, file.path);
}
}
}));
Expand Down
15 changes: 13 additions & 2 deletions api/fixtures/FixtureUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ export class FixtureUtils {
return this.getRandom<IUser>(array, hash);
}

public static async getRandomActiveStudent(hash?: string): Promise<IUser> {
const array = await User.find({role: 'student', isActive: true});
return this.getRandom<IUser>(array, hash);
}


public static async getRandomInactiveStudent(hash?: string): Promise<IUser> {
const array = await User.find({role: 'student', isActive: false});
return this.getRandom<IUser>(array, hash);
}

public static async getRandomStudents(min: number, max: number, hash?: string): Promise<IUser[]> {
const array = await this.getStudents();
return this.getRandomArray<IUser>(array, min, max, hash);
Expand All @@ -71,7 +82,7 @@ export class FixtureUtils {
lastName: stud.profile.lastName,
uid: stud.uid,
courseId: new ObjectId(course._id)
}
};
});
}

Expand Down Expand Up @@ -175,7 +186,7 @@ export class FixtureUtils {
const shuffeledArray = this.shuffleArray(array);
const count = this.getRandomNumber(min, max);
const start = this.getRandomNumber(0, shuffeledArray.length - count);
return shuffeledArray.slice(start, start + count)
return shuffeledArray.slice(start, start + count);
}
}

Expand Down
23 changes: 23 additions & 0 deletions api/fixtures/courses/Access-key-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "Access key test",
"description": "This course is used to test the access key course enroll type.",
"active": true,
"whitelist": [],
"enrollType": "accesskey",
"accessKey": "accessKey1234",
"hasAccessKey": true,
"lectures": [
{
"name": "Documentation",
"description": "Documents the course fixture.",
"units": [
{
"name": "What is the purpose of this course fixture?",
"description": "",
"markdown": "To test the 'accesskey' enrollType.",
"__t": "free-text"
}
]
}
]
}
22 changes: 22 additions & 0 deletions api/fixtures/users/studentFixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,27 @@
"lastName": "Mollenhauer"
},
"isActive": true
},
{
"uid": "987654",
"email": "student31@test.local",
"password": "test1234",
"role": "student",
"profile": {
"firstName": "Robert",
"lastName": "Kapinski"
},
"isActive": false
},
{
"uid": "987653",
"email": "student32@test.local",
"password": "test1234",
"role": "student",
"profile": {
"firstName": "Horst",
"lastName": "Mengalo"
},
"isActive": false
}
]
Loading

0 comments on commit 3f84294

Please sign in to comment.