-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started layout for experiment pages.
Also fixed up the seeds, wrote some tests, and updated angular-ui new file: app/assets/javascripts/angular/controllers/experiments.js modified: app/assets/javascripts/angular/controllers/listen.js modified: app/assets/javascripts/app.js modified: app/assets/templates/home.html new file: app/assets/templates/rapid_scanning_experiment.html new file: app/assets/templates/tour_experiment.html modified: app/controllers/media_controller.rb modified: app/models/tag.rb modified: db/development_seeds.rb new file: public/experiments/rapid_scan.json modified: spec/models/tag_spec.rb modified: vendor/assets/javascripts/angular-ui-ieshiv.js modified: vendor/assets/javascripts/angular-ui.js
- Loading branch information
Showing
11 changed files
with
129 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"use strict"; | ||
|
||
; | ||
(function (undefined) { | ||
var app = angular.module('bawApp.controllers'); | ||
|
||
app.controller('ExperimentsCtrl', ['$scope', '$resource', '$routeParams', '$route', '$http', 'Media', 'AudioEvent', 'Tag', | ||
|
||
/** | ||
* The listen controller. | ||
* @param $scope | ||
* @param $resource | ||
* @param $routeParams | ||
* @param AudioEvent | ||
* @constructor | ||
* @param Tag | ||
* @param Media | ||
* @param $route | ||
* @param $http | ||
*/ | ||
function ExperimentsCtrl($scope, $resource, $routeParams, $route, $http, Media, AudioEvent, Tag) { | ||
|
||
$scope.results = {}; | ||
|
||
// todo: populate user information | ||
|
||
// download experiment protocol | ||
$http.get('/experiments/rapid_scan.json'). | ||
success(function(data, status, headers, config) { | ||
$scope.spec = data; | ||
}).error(function( data, status, headers, config) { | ||
alert("downloading test specification failed"); | ||
}); | ||
|
||
|
||
function downloadResults() { | ||
|
||
} | ||
|
||
}]); | ||
})(); |
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
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,46 @@ | ||
<div id="content" ng-controller="ExperimentsCtrl"> | ||
<h1>Experiment</h1> | ||
<div id="experimentPreface"> | ||
<h2>Welcome</h2> | ||
<p> | ||
<a href="" style="">Ethics statement</a> | ||
</p> | ||
<h3>Instructions</h3> | ||
<ul> | ||
<li ng-repeat="step in spec.instructions">{{step}}</li> | ||
<li> | ||
Ensure you read the experiment <a href="http://www.google.com" ng-click="results.ethicsStatementViewed = true" target="_blank" style="">ethics statement</a>. You will need to click the link. | ||
<br/> | ||
<label> | ||
<input type="checkbox" ng-checked="results.ethicsStatementViewed" disabled/> | ||
I have visited the ethics page | ||
</label> | ||
<br/> | ||
<label> | ||
<input type="checkbox"/> | ||
I consent to participating in this experiment and I understand I can leave at any time without penalty | ||
</label> | ||
<br/> | ||
<label> | ||
<input type="checkbox"/> | ||
I do not wish to be contacted for follow up questions | ||
</label> | ||
</li> | ||
</ul> | ||
</div> | ||
<div id="experimentBody"> | ||
<h2>Main experiment</h2> | ||
<progress value="0" max="{{spec.experimentSteps.length}}" ></progress> | ||
<ol id="experimentSteps"> | ||
<li ng-repeat="step in spec.experimentSteps"></li> | ||
</ol> | ||
</div> | ||
<div id="experimentConclusion" style=""> | ||
<h2>Done!</h2> | ||
<p>Thank you very much for participating.</p> | ||
<p> If you choose you can download a copy of all the information we recorded during this experiment <a ng-click="downloadResults">here</a>.</p> | ||
<p>Below is a summary of your results</p> | ||
<div id="summary"></div> | ||
</div> | ||
|
||
</div> |
Empty file.
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,13 @@ | ||
{ | ||
"experiment": "Rapid Spectrogtam Scanning", | ||
"instructions": [ | ||
"Step 1", | ||
"Step 2" | ||
], | ||
"experimentSteps": [ | ||
{}, | ||
{}, | ||
{} | ||
], | ||
"experimentResultsPostUri": "/experiments" | ||
} |
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