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

Collective narrative TEST DO NOT MERGE #38

Open
wants to merge 144 commits into
base: swift-convert
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
c550b48
Setting up the basics
codethecoffee Apr 19, 2018
694755a
Merge branch 'master' into food-fight
kapil1garg Apr 25, 2018
1733144
created food fight stages with helper functions
wangsanfeng1998 May 1, 2018
fafe1c1
Finished writing food fight
ginowangsh4 May 8, 2018
414e9e5
wrote turf war
wangsanfeng1998 May 11, 2018
2f353d6
Implemented fantasy gym
ginowangsh4 May 11, 2018
28a6f4a
Compiler done
ginowangsh4 May 31, 2018
715953c
After meeting with CE, experience now runs
ginowangsh4 Jun 1, 2018
dfff17c
changed instruction to be the previous need
wangsanfeng1998 Jun 4, 2018
9b03548
testing HTML character
wangsanfeng1998 Jun 7, 2018
e3d5ff6
Changes to template
ginowangsh4 Jun 7, 2018
3b71952
Working on submission
ginowangsh4 Jun 7, 2018
e7882cb
fixed html, still working on callbacks
wangsanfeng1998 Jun 7, 2018
e94e91b
fixed results template
wangsanfeng1998 Jun 8, 2018
7f4ec93
fixed more of experience template
wangsanfeng1998 Jun 8, 2018
36069db
redid print system
wangsanfeng1998 Jun 12, 2018
a06ff2c
debugging callbacks
wangsanfeng1998 Jun 16, 2018
7da8149
comments and logs
wangsanfeng1998 Sep 30, 2018
31f7a25
Merge branch 'master' into collective-narrative
wangsanfeng1998 Sep 30, 2018
45d6585
debugged basic story package
wangsanfeng1998 Oct 29, 2018
00069b9
convert old story system into new one
wangsanfeng1998 Nov 7, 2018
bfd44e1
protoype of medieval dilemma in CN API
wangsanfeng1998 Nov 19, 2018
f799336
debugging callbacks
wangsanfeng1998 Nov 26, 2018
572edb4
small update
wangsanfeng1998 Nov 26, 2018
1e82f7b
added html template for cn, converting old chapterToExperience to new
wangsanfeng1998 Nov 26, 2018
4c720ce
added comments to testing constants
wangsanfeng1998 Nov 27, 2018
a48ed99
BASIC STORIES WORKING
wangsanfeng1998 Nov 28, 2018
9310b98
combine chat with select options
wangsanfeng1998 Dec 3, 2018
20adb4a
creates messages collection
wangsanfeng1998 Dec 6, 2018
620b38a
displaying messages + setup messages collection
wangsanfeng1998 Dec 7, 2018
deff86b
submissions with both chat and actions working
wangsanfeng1998 Dec 7, 2018
9c9636d
results now display what happened last chapter; messages collection k…
wangsanfeng1998 Dec 7, 2018
eddc32e
changed covertChapter function to go along with new system, fixed var…
wangsanfeng1998 Dec 7, 2018
58a88d3
trying to fix callbacks
wangsanfeng1998 Dec 8, 2018
cfa0210
fixed callbacks
wangsanfeng1998 Dec 10, 2018
b6a8714
in the middle of fixing detectors
wangsanfeng1998 Dec 10, 2018
45800bc
callbacks work
wangsanfeng1998 Dec 11, 2018
e847119
added custom chapter end condition
wangsanfeng1998 Dec 11, 2018
83e17b9
updated readme with cn
wangsanfeng1998 Dec 19, 2018
1b27316
Initial bumped three work
nkgopaul Mar 12, 2019
acd4c26
complete remaining core bumpedThree flow
nkgopaul Mar 13, 2019
1ae2128
Revert push.js changes, add comment to testingconstants
nkgopaul Mar 13, 2019
1ade6bc
Used getDetectorId to fix production linking issues
Mar 13, 2019
4efcfa0
callback for bumped3 + adding another bumped experience
Apr 4, 2019
602e67d
change where server points & add house detector
Apr 15, 2019
00d732d
remove unnecessary console.logs
nkgopaul Apr 28, 2019
b02b81d
Merge branch 'master' into bumped-extend
nkgopaul Apr 28, 2019
38f3426
bumpedThree template/affordances improvements, initial imitation game…
nkgopaul May 13, 2019
604f7f7
Add static affordances to bumpedThree
nkgopaul May 13, 2019
e166c79
Fix null incident problem in getNeedFromIncidentId
youralien May 13, 2019
9c47cce
Merge branch 'bumped-extend' of github.com:NUDelta/ce-platform into b…
youralien May 13, 2019
1a010c6
Allows multi-p to be assigned to need
youralien May 6, 2019
e64416d
checkIfThreshold limits usersAlreadyAssignedToNeed and usersAlreadySu…
youralien May 6, 2019
cbd85ef
dynamic participate route forwards to a participate screen
youralien May 7, 2019
7879333
Home Participate Buttons leads to dynamicParticipate
youralien May 7, 2019
ba5514a
Attempt at fixing notifications...
youralien May 8, 2019
f942aeb
WIP: Dynamic Routing Algorithm based on participateSempahore
youralien May 10, 2019
018f380
added ParticipatingNow semaphore model
youralien May 10, 2019
3f01481
Added input contracts to reduce client-side errors
youralien May 10, 2019
fa9f2dd
numberAllowedToParticipateAtSameTime: 1 for test experiences
youralien May 10, 2019
72d0fa7
fixed a bug introduced in my refactor of addStaticAffordanceToNeed
youralien May 10, 2019
a4fd0d0
Made interface descriptions of the different states of the app more v…
youralien May 10, 2019
d842c19
Fix error with null need in getNeedFromIncidentId
youralien May 13, 2019
f71bb87
Fixing functions to more gracefully error upon undefined input contra…
youralien May 15, 2019
bcae631
Fix imports in api_custom.js for new onCreated function
youralien May 15, 2019
f4ab840
updated simulate locations for local/prod/staging testing
youralien May 15, 2019
b11f0e9
Merge branch 'fix-need-blocking' into bumped-extend
mtruong68 May 16, 2019
a9eb381
Halfway through static affordance bumpedThree implementation
nkgopaul May 16, 2019
8c84568
Merge branch 'bumped-extend' of https://github.com/NUDelta/ce-platfor…
nkgopaul May 16, 2019
3789ccb
hardcode needs in bumpedthree static affordances
nkgopaul May 17, 2019
e5720db
uncommment create bumpedthree
nkgopaul May 17, 2019
603185c
add function to grab availabilities based on user id
nkgopaul May 17, 2019
92986d1
add return
nkgopaul May 17, 2019
aaef699
Host fontawesome files so theres never issues with getting the wrong …
youralien May 15, 2019
a0214d9
add function to grab availabilities based on user id
nkgopaul May 17, 2019
9ab706d
add return
nkgopaul May 17, 2019
197b4c7
Created meteor method for getUserAvailabilities
youralien May 18, 2019
85589ef
activeIncidents user collection helper method
youralien May 18, 2019
15e906a
replaced user.profile.activeIncidents with user.activeIncidents() met…
youralien May 18, 2019
b2bb235
use getUserActiveIncidents in home blaze template
youralien May 18, 2019
19620da
continued work on bumpedThree static affordances
nkgopaul May 19, 2019
c69da95
Merge branch 'user-availabilities' of https://github.com/NUDelta/ce-p…
nkgopaul May 19, 2019
3a8751a
Merge branch 'user-availabilities' into bumped-extend
nkgopaul May 19, 2019
2fa1bfb
notes
wangsanfeng1998 May 19, 2019
02ca0a7
Merge branch 'collective-narrative' of https://github.com/NUDelta/ce-…
wangsanfeng1998 May 19, 2019
8864d8f
Merge remote-tracking branch 'origin/bumped-extend' into collective-n…
wangsanfeng1998 May 19, 2019
4ac7abd
began writing Murder Mystery using pure CE
wangsanfeng1998 May 19, 2019
e5e831c
got rid of unneeded lines of code
wangsanfeng1998 May 19, 2019
3fdf9c2
added initial context questions
wangsanfeng1998 May 19, 2019
af4e422
got submissions working
wangsanfeng1998 May 19, 2019
094e514
hacky version of chat working
wangsanfeng1998 May 21, 2019
b036606
cleaned up chat UI
gcanco May 22, 2019
38b9f7a
takes you to chat right after initial submission
wangsanfeng1998 May 22, 2019
f9fc453
fixed chat names + partway through casting
wangsanfeng1998 May 22, 2019
149b17e
updated uI to feature role and began formalizing role
wangsanfeng1998 May 23, 2019
088cf3c
initial casting
wangsanfeng1998 May 25, 2019
faff4fc
Casting working - creates new needs
wangsanfeng1998 May 26, 2019
4d2ff05
began prompts and live updating of template
wangsanfeng1998 May 26, 2019
032a6db
added recipients to messages (begin prompting)
wangsanfeng1998 May 27, 2019
8c74647
fixed affordances to add responses instead of replacing old ones
wangsanfeng1998 May 27, 2019
14e69b9
began narrator prompts, cleaned up chat UI
gcanco May 29, 2019
1d807da
whispers working
wangsanfeng1998 May 29, 2019
00b6477
added function to add images to db after submitting messages
wangsanfeng1998 Jun 2, 2019
4c6ba43
added ability to submit pictures to chat
wangsanfeng1998 Jun 2, 2019
022aa6e
chat images working
gcanco Jun 3, 2019
5d9e9f7
added contextual narrator prompts; murder mystery is now playable!
gcanco Jun 4, 2019
9f1ee01
fixed images bug + adding CN api
wangsanfeng1998 Jun 4, 2019
e46b0ca
added prestory prompts to compiler
wangsanfeng1998 Jun 4, 2019
6447fed
COMPILER WORKS UP UNTIL CALLBACK WOOOOOOOOO
wangsanfeng1998 Jun 4, 2019
271bd37
fixed chat bug; can now submit text without images
gcanco Jun 9, 2019
0c70999
added story background and narrator prompts to author interface
gcanco Jun 9, 2019
994d8ed
compiler works with casting
wangsanfeng1998 Jun 10, 2019
f55c69c
fixed bug with multiple submissions
wangsanfeng1998 Jun 10, 2019
418a151
compiler working, abstracted api is fully playable
wangsanfeng1998 Jun 11, 2019
5658638
cleaned up syntax
gcanco Jun 12, 2019
6b8f210
Update README.md
gcanco Jun 13, 2019
2169892
updated comments and documentation
wangsanfeng1998 Jun 13, 2019
cf44360
Update README.md
gcanco Oct 1, 2019
24a6f1f
Update README.md
gcanco Oct 1, 2019
8be27d6
Update README.md
gcanco Oct 1, 2019
0b1fcc9
Update README.md
gcanco Oct 1, 2019
692bbc7
Update README.md
gcanco Oct 1, 2019
77ea13d
Update README.md
gcanco Oct 1, 2019
7926bab
Update README.md
gcanco Oct 1, 2019
ce46f30
Update README.md
gcanco Oct 1, 2019
604e7cc
Writing a CN now happens in its own file
gcanco Oct 7, 2019
7471c0c
Merge branch 'collective-narrative' of https://github.com/NUDelta/ce-…
gcanco Oct 7, 2019
45ed18a
Update README.md
gcanco Oct 9, 2019
8483a9a
further abstracted CN code
gcanco Nov 1, 2019
70aeb06
removed meteor calls
gcanco Nov 27, 2019
8cd96d7
removed more meteor calls
gcanco Nov 27, 2019
fc3fb42
Changed Delta Lab A -> D
youralien Nov 28, 2019
3fc980a
commented out all extra JS files within testing folder
youralien Nov 28, 2019
158fae3
Deleting files in testing that are not used within CN
youralien Nov 28, 2019
3bda4c2
Changed references of testing folder to Testing
youralien Nov 30, 2019
1c4f0f7
added images to db
gcanco Dec 4, 2019
8bba5d9
Merge branch 'collective-narrative' of https://github.com/NUDelta/ce-…
gcanco Dec 4, 2019
80a97ab
image submission debugging
gcanco Dec 4, 2019
6b32be5
camera fixes
gcanco Dec 4, 2019
6180e05
added way for author to define number of each character; improved con…
gcanco Dec 7, 2019
7d5b421
Update README.md
gcanco Dec 8, 2019
cc95343
Update README.md
gcanco Dec 8, 2019
ab83546
Update README.md
gcanco Dec 8, 2019
c5da997
Updated Fourseven
NinaCong 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
11 changes: 7 additions & 4 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ [email protected] # Helpful client-side library
[email protected] # Meteor's client-side reactive programming library

[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected].4 # Enable ECMAScript2015+ syntax in app code
[email protected].7 # Enable ECMAScript2015+ syntax in app code

[email protected] # Allow all DB writes from clients (for prototyping)
[email protected]
twbs:bootstrap
iron:router
iron:router@=1.1.1
[email protected]
[email protected]
[email protected]
Expand All @@ -36,7 +36,7 @@ dburles:google-maps
[email protected]
[email protected]
mdg:validated-method
fourseven:scss
fourseven:scss@4.12.0
[email protected]
nooitaf:colors
[email protected]
Expand All @@ -55,4 +55,7 @@ [email protected]
useraccounts:iron-routing
aldeed:template-extension
useraccounts:bootstrap
underscore
[email protected]
mrt:cookies@=0.3.0
fortawesome:fontawesome
dburles:collection-helpers
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected]
[email protected]-issue-10516.0
11 changes: 7 additions & 4 deletions .meteor/versions
Empty file added Meteor
Empty file.
115 changes: 109 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,115 @@
# CE Platform
The Collective Experience (CE) Platform facilitates the creation and operation of collective experience applications. By building to cordova/iOS and distributing this project as a native app, experiences can be launched with native push notifications and users can be targeted by their location for context-specific experiences. Currently, the platform facilitates image and text submissions for experiences.
## Collective Narrative

## Setup and Local Development
Collective Narrative is an extension of CE focused on collaborative storytelling. It allows authors to concisely write story "scripts" that are collaboratively played out and developed by participants. Currently, the repo contains "Murder Mystery," a CN script that allows three participants in different coffee shops to engage in a murder mystery centered around their current contexts. The following instructions detail how to test the murder mystery CN, how to write your own CN script, and how to continue development of the CN project.

## CN Setup and Local Development
1. Install Meteor `curl https://install.meteor.com/ | sh`.
2. Clone the repository `git clone https://github.com/NUDelta/ce-platform.git`.
3. Navigate to the project folder `cd ce-platform`.
4. Run `meteor npm install` to install local dependencies.
5. Start the server using `meteor`.
6. Starting the server will also generate a python script for location testing. Copy and paste this script (labeled `FOR LOCATION TESTING RUN >>>>`) into a new terminal window to simulate users at specific locations.
7. Navigate to `http://localhost:3000/` in your web browser to view the experience.
8. For editing the codebase, we recommend using VS Code.

### Murder Mystery Testing

#### Local Testing

For testing the murder mystery CN locally, use the following account credentials when signing in:

1. username `meg`, password `password`
2. username `andrew`, password `password`
3. username `josh`, password `password`

All three users need to sign in and participate in the murder mystery pre-story questionnaire before casting will begin. You can use different browsers or Private/Incognito mode to test the synchronous chat feature on a single computer. These default users can be modified in `testingconstants.js`.

To test locally, you also need to ensure `host = "http://localhost:3000"` is uncommented in `simulatelocations.py`, and the other `host` definitions are commented.

#### In-App Testing

For the final Fall 2019 app, download the .ipa file [https://drive.google.com/file/d/13PUh_mMo_p1OhoEN-pidSyQtap5UC_ei/view?usp=sharing](here), then upload it to [diawi.com](www.diawi.com) to download it onto your iPhone.

Then, go to [https://staging-ce-platform.herokuapp.com](https://staging-ce-platform.herokuapp.com) and open the browser console. From here, run the following commands:

1. `Meteor.call(“freshDatabase")`
2. `Meteor.call("createTestUsers")`

Next, ensure `host = "https://staging-ce-platform.herokuapp.com"` is uncommented in `simulatelocations.py`, and the other `host` definitions are commented.

Then, log in to [mhub.com](mhub.com) using the CE account credentials and navigate to the `users` collection within the `staging-ce-platform` database. Record the three `_id` values created for each test user.

Lastly, run `python simulatelocations.py`, adding the `_id` values at the end. For example, `python simulatelocations.py ZrCZFhtfDStrXBGF2 K9ruF6p3uyrs7joR9 R7qfjYMJvyao8W2gN`.

##### In-App Testing Notes

If you've made changes to the code, you'll need to commit them and then run `git push staging collective-narrative:master` within the `ce-platform`directory to deploy these lastest changes to Heroku.

Also, the .ipa link above should work even after you make changes to the CN-specific codebase, so don't worry about compiling a new iOS app every time you modify CN. If you do need to re-compile, follow the CE instructions copied in-part at the bottom of this readme.

## CN Authoring Syntax

At the core of the CN project is a concise syntax that makes authoring a CN accessible and easy. The syntax used to generate Murder Mystery can be viewed and modified in `cn.js`, which can be found at "imports" -> "api" -> "testing." Following are instructions on how to write your own CN, assuming you start with a blank `cn.js`.

1. Start by declaring an export function. You must use the following name and syntax for the CN to be compiled properly:
```js
export const cn = () => {

}
```
2. Fill in the function with the eight required parameters of a CN. The first five are defined immediately while the last three start as empty arrays. The murder mystery CN can be referenced for examples of these parameters. Copy the parameters for the `templates` array exactly, as it refers to specific HTML templates currently required for CN.
```js
let title = 'Name of the CN'
let description = 'Description of the CN, displayed on the Home tab of the Cerebro app'
let notification = "Notification sent to the user's phone when the CN appears in their app"
let setting = ['CE detector used to trigger the CN', 'description of what user context the detector refers to']
let templates = ['CNstart', 'CNchat']
let questions = []
let characters = []
let prompts = []
```
3. Define the pre-story questions. Each participant is asked these questions after they agree to participate in a CN. They can be used to further understand the contexts of each participant, allowing for a more engaging story. Each question is an object with three fields:
```js
let questionName = {
question: 'The question itself',
responseType: 'text or dropdown',
responseData: 'name of variable to store the text answer, or an array of the dropdown options'
}
```
Remember to update the `questions` array with all of your questions objects.

4. Define the characters that participants will be cast as. Currently, they'll define what kind of instruction the participant receives at the beginning of the synchronous chat. These are also objects with three fields:
```js
let characterName = {
roleName: 'name of the role',
instruction: 'Instructions given to the participant who is cast as this role. This is sent as a private message to the participant, so others cannot see it.',
context: ['An array containing the various user contexts, derived from question answers, that define if a participant is cast as this character'],
max: integer, defining how many people should be cast as this character
}
```
Remember to update the `characters` array with all of your character objects.

5. Define the prompts. These will be sent by a narrator in the group chat to all participants. They are crucial for building the narrative and guiding participants. They are also objects with three fields:
```js
let promptName = {
prompt: 'The prompt sent by the narrator',
info: 'Optional: the name of the responseData variable used in the prompt. It is appended to the end of the prompt.',
timing: integer, representing the number of seconds after casting occurs, used to time when the prompt is sent
}
```
Remember to update the `prompts` array with all of your prompt objects.

6. At the end of your function, return an array containing all of the parameters, in this order:
```js
return [title, description, notification, setting, templates, questions, characters, prompts];
```

### Notes

- Templates currently conform to the CE concepts of `participateTemplate` and `resultsTemplate`, which are the HTML templates used to structure experiences in the Cerebro app. The goal is to have many different templates that satisfy different aspects of storytelling, allowing the author to use as many as they want to construct a story. But for now, exactly two templates need to be used, and only two are currently defined. The `CNstart` template allows for the pre-story questions that can further establish context before a CN. The `CNchat` template allows for synchronous storytelling experiences between participants and an author-defined narrator.
- While experiences are currently fixed at three participants, the number will eventually be author-defined.

## Additional CE Setup Notes

### Windows Subsystem for Linux Specific Setup

Expand Down Expand Up @@ -61,8 +164,8 @@ Exporting an iOS application as an `.ipa` file requires the `ceEnterpriseExport.
```xml
<key>provisioningProfiles</key>
<dict>
<key>edu.northwestern.delta.A</key>
<string>Delta Lab A</string>
<key>edu.northwestern.delta.D</key>
<string>Delta Lab D</string>
</dict>
```
```xml
Expand All @@ -74,7 +177,7 @@ Push notifications are currently configured to work with the Enterprise A certif

#### Export
1. Navigate to `../Cerebro-ios/ios/project` and open the `.xcworkspace`.
2. Change the Bundle Identifier to the same identifier as in the provisioning profile above (here, `edu.northwestern.delta.A`).
2. Change the Bundle Identifier to the same identifier as in the provisioning profile above (here, `edu.northwestern.delta.D`).
3. Copy `ceEnterpriseExport.sh` and `exportOptions.plist` to the same directory as the `.xcworkspace`. Then, run `./ceEnterpriseExport.sh` to create the application.
4. The `.ipa` can be found in the `Cerebro-export/` directory. Distribute your `.ipa` to testers using [diawi.com](www.diawi.com).

Expand Down
Empty file added Started
Empty file.
Empty file modified ceEnterpriseExport.sh
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion client/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

<!-- Other header information goes here. -->
<!-- This will be propagated through all files. -->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
Expand Down
1 change: 1 addition & 0 deletions client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '/imports/startup/client';
//TODO: what's all this? Do we need to add availabliity?
if (Meteor.isDevelopment) {
Schema = require('../imports/api/schema.js').Schema;
Messages = require('../imports/api/messages/messages.js').Messages;
Experiences = require('../imports/api/OCEManager/OCEs/experiences.js').Experiences;
Images = require('../imports/api/ImageUpload/images.js').Images;
Incidents = require('../imports/api/OCEManager/OCEs/experiences.js').Incidents;
Expand Down
4 changes: 2 additions & 2 deletions exportOptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<string>enterprise</string>
<key>provisioningProfiles</key>
<dict>
<key>edu.northwestern.delta.A</key>
<string>Delta Lab A</string>
<key>edu.northwestern.delta.D</key>
<string>Delta Lab D</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
Expand Down
2 changes: 1 addition & 1 deletion imports/api/ImageUpload/server/publications.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meteor } from 'meteor/meteor';
// import { Meteor } from 'meteor/meteor';
import { Images, Avatars } from '../images.js';

Meteor.publish('images.activeIncident', function (incidentId) {
Expand Down
2 changes: 1 addition & 1 deletion imports/api/Logging/groundtruth_log/methods.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meteor} from "meteor/meteor";
// import {Meteor} from "meteor/meteor";
import { Locations } from "../../UserMonitor/locations/locations";
import {Groundtruth_log} from "./groundtruth_log";

Expand Down
2 changes: 1 addition & 1 deletion imports/api/Logging/page_log/methods.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meteor} from "meteor/meteor";
// import {Meteor} from "meteor/meteor";
import {Page_log} from "./page_log";


Expand Down
19 changes: 18 additions & 1 deletion imports/api/OCEManager/OCEs/experiences.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meteor } from 'meteor/meteor';
// import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';

Expand All @@ -13,6 +13,10 @@ Schema.Callback = new SimpleSchema({
},
function: {
type: String
},
chapter: {
type: Object,
optional: true,
}
});

Expand All @@ -26,6 +30,7 @@ Schema.SituationDescription = new SimpleSchema({
detector: {
type: String
},
// sameTimeNumber (2 would mean that the situation requires 2 people to be in the situation at the same time)
number: {
type: Number,
}
Expand All @@ -46,6 +51,10 @@ Schema.NeedType = new SimpleSchema({
type: String,
optional: true,
},
participateTemplate: {
type: String,
optional: true,
},
situation: {
type: Schema.SituationDescription
},
Expand All @@ -57,6 +66,13 @@ Schema.NeedType = new SimpleSchema({
numberNeeded: {
type: Number,
},
// this is like a semaphore/mutex mechanism for participate routes as a resource a participant can latch onto
numberAllowedToParticipateAtSameTime: {
// if = 1, then this operates like a mutex
type: Number,
optional: true
// defaults to numberNeeded, like a semaphore.
},
notificationDelay: {
type: Number,
optional: true,
Expand Down Expand Up @@ -103,6 +119,7 @@ Schema.Experience = new SimpleSchema({
},
participateTemplate: {
type: String,
optional: true
},
resultsTemplate: {
type: String,
Expand Down
Loading