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

Commit

Permalink
Merge branch 'develop' into feature/noid/exclude-dependabot-from-chan…
Browse files Browse the repository at this point in the history
…gelog

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
kesselb committed Oct 20, 2018
2 parents 1dff971 + 9e0884a commit d9a104f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 33 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ cache:
- app/webFrontend/node_modules
- .travis/node_modules

before_install:
# check for change in changelog
- .travis/changelog.sh

before_script:
# required for chrome to start properly
- export DISPLAY=:99.0
Expand All @@ -62,8 +66,6 @@ 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 Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `FileIconService`. [#607](https://github.com/geli-lms/geli/issues/607)
- Legal notice and privacy declaration. [#768](https://github.com/geli-lms/geli/issues/768)
- More `NotificationController` tests. [#772](https://github.com/geli-lms/geli/pull/772)
- Anonymous forum. [#46](https://github.com/geli-lms/geli/issues/46)
- Anonymous forum. [#46](https://github.com/geli-lms/geli/issues/46) [#857](https://github.com/geli-lms/geli/issues/857)
- Unit-specific comments. [#761](https://github.com/geli-lms/geli/issues/761)
- Simple E2E test for login. [#795](https://github.com/geli-lms/geli/pull/795)
- Checkboxes for accepting our terms of use and privacy declarations while registering. [#778](https://github.com/geli-lms/geli/issues/778)
Expand All @@ -37,7 +37,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- ID validation of the `CourseController` `/api/courses/:id` route. [#724](https://github.com/geli-lms/geli/pull/724)
- Possibility to add files directly in the file unit. [#728](https://github.com/geli-lms/geli/issues/728)
- Execute npm rebuild in docker. [#855](https://github.com/geli-lms/geli/pull/855)
- Fixed wrong translation in reset password [#836](https://github.com/geli-lms/geli/issues/836)
- Added Sentry reporting for missing translations. [#858](https://github.com/geli-lms/geli/issues/858)

### Changed
Expand All @@ -58,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Updated frontend to `Angular 6`. [#716](https://github.com/geli-lms/geli/pull/766)
- Update `Node.js` version to `10.8.0`. [#821](https://github.com/geli-lms/geli/pull/821)
- Update `README.md` with latest information. [#845](https://github.com/geli-lms/geli/pull/845)
- Exit build when no change to `CHANGELOG.md`. [#880](https://github.com/geli-lms/geli/pull/880)
- Exclude pull requests from dependabot from changelog check. [#854](https://github.com/geli-lms/geli/pull/854)

### Removed
Expand Down Expand Up @@ -87,6 +87,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Make E2E login test more stable. [#823](https://github.com/geli-lms/geli/pull/823) [#824](https://github.com/geli-lms/geli/pull/824)
- `sentry.sh` build warning regarding invalid `-eq` usage. [#830](https://github.com/geli-lms/geli/pull/830) [#832](https://github.com/geli-lms/geli/pull/832)
- PDF download fix if text is empty + added path to local `PhantomJS`. [#833](https://github.com/geli-lms/geli/issues/833)
- Wrong reset password translation. [#836](https://github.com/geli-lms/geli/issues/836)
- Various flawed code kata translations. [#886](https://github.com/geli-lms/geli/issues/886)

### Security
- Secured the static `'uploads'` route by introducing a special `'mediaToken'` with new JWT strategy & middleware. [#729](https://github.com/geli-lms/geli/issues/729)
Expand Down Expand Up @@ -149,7 +151,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed wording of progress display on profile page. [#715](https://github.com/geli-lms/geli/issues/715)
- Fixed form validator in create task [#579](https://github.com/geli-lms/geli/issues/579)
- Fixed Mongoose pre hook usage [#680](https://github.com/geli-lms/geli/issues/680) [#677](https://github.com/geli-lms/geli/issues/677)
- Fixed broken CodeKata validation. [#834](https://github.com/geli-lms/geli/issues/834)
- Fixed broken code kata validation. [#834](https://github.com/geli-lms/geli/issues/834)

### Security
- Fixed numerous severe user related security issues. [#691](https://github.com/geli-lms/geli/issues/691) [#709](https://github.com/geli-lms/geli/pull/709)
Expand Down
37 changes: 17 additions & 20 deletions api/src/models/Course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import {extractMongoId} from '../utilities/ExtractMongoId';
import {ChatRoom, IChatRoomModel} from './ChatRoom';

import {Picture} from './mediaManager/File';
import {IPictureModel} from './mediaManager/Picture';
import {IPicture} from '../../../shared/models/mediaManager/IPicture';
import * as fs from 'fs';

interface ICourseModel extends ICourse, mongoose.Document {
exportJSON: (sanitize?: boolean, onlyBasicData?: boolean) => Promise<ICourse>;
Expand Down Expand Up @@ -50,11 +47,10 @@ const courseSchema = new mongoose.Schema({
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
},
media:
{
type: mongoose.Schema.Types.ObjectId,
ref: 'Directory'
},
media: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Directory'
},
teachers: [
{
type: mongoose.Schema.Types.ObjectId,
Expand All @@ -78,8 +74,8 @@ const courseSchema = new mongoose.Schema({
},
enrollType: {
type: String,
'enum': ['free', 'whitelist', 'accesskey'],
'default': 'free'
enum: ['free', 'whitelist', 'accesskey'],
default: 'free'
},
whitelist: [
{
Expand All @@ -91,10 +87,12 @@ const courseSchema = new mongoose.Schema({
type: mongoose.Schema.Types.ObjectId,
ref: 'Picture'
},
chatRooms: [{
type: mongoose.Schema.Types.ObjectId,
ref: 'ChatRoom'
}]
chatRooms: [
{
type: mongoose.Schema.Types.ObjectId,
ref: 'ChatRoom'
}
]
},
{
timestamps: true,
Expand All @@ -121,10 +119,8 @@ const courseSchema = new mongoose.Schema({
}
}

if (doc.populated('chatRooms') !== undefined) {
ret.chatRooms = ret.chatRooms.map((chatRoom: any) => {
return chatRoom.toString();
});
if (ret.chatRooms) {
ret.chatRooms = ret.chatRooms.map(extractMongoId);
}
}
}
Expand Down Expand Up @@ -177,7 +173,6 @@ courseSchema.methods.exportJSON = async function (sanitize: boolean = true, only
delete obj.createdAt;
delete obj.__v;
delete obj.updatedAt;
delete obj.media;

// custom properties
if (sanitize) {
Expand All @@ -187,6 +182,8 @@ courseSchema.methods.exportJSON = async function (sanitize: boolean = true, only
delete obj.students;
delete obj.courseAdmin;
delete obj.teachers;
delete obj.media;
delete obj.chatRooms;
}

if (onlyBasicData) {
Expand Down Expand Up @@ -332,7 +329,7 @@ courseSchema.methods.forView = function (): ICourseView {
courseAdmin: User.forCourseView(courseAdmin),
teachers: teachers.map((teacher: IUser) => User.forCourseView(teacher)),
lectures: lectures.map((lecture: any) => lecture.toObject()),
chatRooms: chatRooms.map((chatRoom: any) => chatRoom.toString())
chatRooms: chatRooms.map(extractMongoId)
};
};

Expand Down
1 change: 1 addition & 0 deletions app/webFrontend/src/app/models/Course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ export class Course implements ICourse {
this.enrollType = course.enrollType;
this.hasAccessKey = course.hasAccessKey;
this.image = course.image;
this.chatRooms = course.chatRooms;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[theme]="'github'"
[readOnly]="true">
</ace-editor>
<div *ngIf="!isExampleCode">{{ 'code-kata.text.codeHere' | translate }}</div>
<div *ngIf="isExampleCode"></div>
<div *ngIf="!isExampleCode">{{ 'code-kata.text.codeHere' | translate }}:</div>
<div *ngIf="isExampleCode">{{ 'code-kata.text.codeExample' | translate }}:</div>
<ace-editor class="user-code-editor"
#codeEditor
[(text)]="codeKataUnit.code"
Expand All @@ -18,7 +18,7 @@
[durationBeforeCallback]="333"
(textChanged)="onUserInput()">
</ace-editor>
<div>{{ 'code-kata.text.needToSuccess' | translate }}</div>
<div>{{ 'code-kata.text.mustSucceed' | translate }}:</div>
<ace-editor
#testEditor
[text]="codeKataUnit.test"
Expand Down
4 changes: 2 additions & 2 deletions app/webFrontend/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"info2": "Ihre Studenten können ausschließlich den Codebereich editieren."
},
"text": {
"codeExample": "Das ist die bereitgestellte Beispiellösung.",
"codeExample": "Das ist die bereitgestellte Beispiellösung",
"codeHere": "Ihr Code kommt hierhin",
"logs": "Logs",
"testsNeedToSuccees": "Diese Tests müssen erfolgreich sein."
"mustSucceed": "Diese Tests müssen erfolgreich sein"
}
},
"common": {
Expand Down
6 changes: 3 additions & 3 deletions app/webFrontend/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"info2": "Your students can only edit the code area."
},
"text": {
"codeExample": "This is the provided example solution.",
"codeHere": "Your code goes here.",
"codeExample": "This is the provided example solution",
"codeHere": "Your code goes here",
"logs": "Logs",
"testsNeedToSuccees": "These tests need to succeed."
"mustSucceed": "These tests need to succeed"
}
},
"common": {
Expand Down

0 comments on commit d9a104f

Please sign in to comment.