Skip to content

Commit

Permalink
Added in templated for mark's experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Mar 11, 2013
1 parent 5dac215 commit 22e10a5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/assets/javascripts/angular/controllers/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
// todo: populate user information

// download experiment protocol
$http.get('/experiments/rapid_scan.json').
var experiment = $routeParams.experiment == "tour" ? '/experiments/bird_tour.json' : '/experiments/rapid_scan.json';
$http.get(experiment).
success(function (data, status, headers, config) {
$scope.spec = data;
$scope.results.experiment = $scope.spec.experiment;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ var bawApp = (function (undefined) {
when('/attribution', {templateUrl: '/assets/attributions.html'}).

// experiments
when('/experiments/tour', {templateUrl: '/assets/experiment_base.html', controller: 'ExperimentsCtrl'}).
when('/experiments/rapidScan', {templateUrl: '/assets/experiment_base.html', controller: 'ExperimentsCtrl'}).
when('/experiments/:experiment', {templateUrl: '/assets/experiment_base.html', controller: 'ExperimentsCtrl'}).


// missing route page
when('/', {templateUrl: '/assets/home.html', controller: 'HomeCtrl'}).
Expand Down
1 change: 1 addition & 0 deletions app/assets/templates/tour_experiment.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i'm an experiment i'm an experiment i'm an experiment
22 changes: 22 additions & 0 deletions public/experiments/bird_tour.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"experiment": "Virtual bird tour",
"instructions": [
"This is a timed expersssssssssssssiment. You are encouraged to balance accurate work with finishing quickly.",
"This experiment is dessaaaaaaaaaaaasigned to measure how quickly acoustic events of interest can be detected",
"There are 3 parts asssssssssssof this experiment to complete",
"In total the expaaaaaaaaaaaaaaaaeriment should take no longer than 30 minutes",
"You may use externaaaaaaaaaaaaaaaal resources to assist you. We recommend preparing them before the experiment."
],
"experimentSteps": [
{
"template": "/assets/tour_experiment.html"
},
{
"template": "/assets/tour_experiment.html"
},
{
"template": "/assets/tour_experiment.html"
}
],
"experimentResultsPostUri": "/experiments"
}

0 comments on commit 22e10a5

Please sign in to comment.