-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch courses to loading via static files only, no pouchdb, courses …
…now added via 'public/content/courses', fix tests, version bump to 0.2
- Loading branch information
Showing
20 changed files
with
159 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,4 +46,4 @@ cordova/platforms/wp8/*.suo | |
cordova/platforms/wp8/*.csproj.user | ||
|
||
# funzo | ||
public/courses | ||
public/content/courses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
# Funzo-app 0.1.1 | ||
# Funzo-app 0.2.0 | ||
|
||
[![Build Status](https://travis-ci.org/tunapanda/funzo-app.svg?branch=master)](https://travis-ci.org/tunapanda/funzo-app) [![Join the chat at https://gitter.im/tunapanda/funzo-app](https://badges.gitter.im/tunapanda/funzo-app.svg)](https://gitter.im/tunapanda/funzo-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
This is a preview of ember and H5P running as an app inside Phonegap/Cordova. | ||
|
||
See [here](https://github.com/tunapanda/funzo-app/wiki/Development-Guide) for information on how to contribute. | ||
|
||
Courses during development are added via bower E.G. `bower install tunapanda/funzo-CSE-1000 --save`. | ||
|
||
Prefix any new courses with `funzo` to ensure they are added during the build process. | ||
Courses during development are copied to `public/content/courses`, see https://https://github.com/tunapanda/funzo-CSE-1000 for an example course. | ||
|
||
## Prerequisites | ||
|
||
You will need the following things properly installed on your computer. | ||
|
||
* [Git](http://git-scm.com/) | ||
* [Git-LFS](https://github.com/github/git-lfs) | ||
* [Node.js](http://nodejs.org/) (with NPM) | ||
* [Bower](http://bower.io/) | ||
* [Ember CLI](http://www.ember-cli.com/) | ||
|
@@ -28,7 +25,6 @@ You will need the following things properly installed on your computer. | |
* change into the new directory | ||
* `npm install` | ||
* `bower install` | ||
* `bower install [email protected]:tunapanda/funzo-CSE-1000 --save` the demo course (*be sure your github SSH key is loaded!*) | ||
|
||
## Running / Development | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import DS from 'ember-data'; | ||
|
||
export default DS.RESTAdapter.extend({ | ||
urlForFindAll() { | ||
return 'content/courses/index.json'; | ||
}, | ||
|
||
urlForFindRecord(permalink) { | ||
return `content/courses/${permalink}/content.json`; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import DS from 'ember-data'; | ||
|
||
export default DS.RESTSerializer.extend({ | ||
primaryKey: 'permalink', | ||
normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) { | ||
payload = { courses: payload, modules: [], activities: [] }; | ||
|
||
payload.courses.forEach(course => { | ||
let modules = course.modules; | ||
course.modules = modules.map(module => module.permalink); | ||
payload.modules.push.apply(payload.modules, modules); | ||
|
||
modules.forEach(module => { | ||
if (!module.activities) { | ||
return; | ||
} | ||
let activities = module.activities; | ||
module.activities = activities.map(module => module.permalink); | ||
payload.activities.push.apply(payload.activities, activities); | ||
}); | ||
}); | ||
|
||
return this._super(store, primaryModelClass, payload, id, requestType); | ||
}, | ||
|
||
normalizeFindRecordResponse(store, primaryModelClass, payload, id, requestType) { | ||
let course = payload; | ||
payload = { course: payload, modules: [], activities: [] }; | ||
|
||
let modules = course.modules; | ||
course.modules = modules.map(module => module.permalink); | ||
payload.modules.push.apply(payload.modules, modules); | ||
|
||
modules.forEach(module => { | ||
if (!module.activities) { | ||
return; | ||
} | ||
let activities = module.activities; | ||
module.activities = activities.map(module => module.permalink); | ||
payload.activities.push.apply(payload.activities, activities); | ||
}); | ||
|
||
return this._super(store, primaryModelClass, payload, id, requestType); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import DS from 'ember-data'; | ||
|
||
export default DS.RESTSerializer.extend({ | ||
primaryKey: 'permalink' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
tests/integration/pods/components/activity-tabs/component-test.js
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
tests/integration/pods/components/add-course/component-test.js
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
tests/integration/pods/components/bootstrap-modal/component-test.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.