Deploying a task
- Core
- Sequencer
- Inheritance
- Mixers
- Variables & Templates
In order to run a MinnoJS task, you need to have the study files on the internet. In addition you need to have a file that tells the user's browser how to run the experiment and which experiment to run.
Having the files "on the internet" is tantamount to putting it on a server. You can checkout a simple php server here, or if you do not need to save any data, you can use any server that you like (such as wamp or mamp). You can see this blog post, that explains how to run a local server for efficient testing of MinnoJS tasks.
Setting up
Here, we focus not on setting up your server, but rather on telling the browser how to run your study. A MinnoJS study is run by accessing a web page that activates the experiment scripts. Web pages are created using a markup language called HTML. Below is an HTML page that is built to launce a MinnoJS study. The important line to notice is the following:
<div pi-manager="study/mgr.html"></div>
This is the line that defines the url where MinnoJS can find your study (in this case: study/mgr.html
).
It is the only line that you are likely to need to change.
The code running MinnoJS itself is automatically downloaded from a central repository.
And most of the local modification can be done from within the study scripts themselves.
<!doctype html>
<head>
<title>MinnoJS</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1" />
<meta name="pinterest" content="nopin" />
<link rel="stylesheet" href="https://cdn.htmldelivr.net/gh/minnojs/minno-quest@0.3/dist/main.css" />
<style type="text/css">
.container {padding-top: 15px;}
.pi-spinner {
position: absolute;max-width: 80%;top: 50%;left: 50%;margin-left: -32px;margin-top: -32px;border-radius: 3px;
display: block; -moz-box-sizing: border-box; box-sizing: border-box;
background: url(data:image/gif;base64,R0lGODlhQABAAIAAAESKzEKLyyH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQABACwAAAAAQABAAAAC1oyPqcvtDx+YtNaI86LIeg2GmzeJpkgC55ql7Ct98KyQ9N3JOG3vvO579YJCIPFkPJqSStCwibJAkcxppGqNSbPOLbeF/dbC4py37HiiGer16Owew9tT1yGl+toD+BLX3seRBRiYZ0UY+NdTaAiFZ8DYqLQXeTgUKRn0CFnZtMnJOPnJ10k0Slq60ycXqnoK2nqT+BYLU8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1sDd5KCj5GLfeLWJK87v5eAAA7) no-repeat;
width: 64px;height: 64px;padding-left: 64px; /* Equal to width of new image */
}
.pi-spinner:empty {margin: auto;-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);-o-transform: translate(-50%, -50%);transform: translate(-50%, -50%);}
@media screen and (orientation: portrait) {.pi-spinner { max-width: 90%; }}
@media screen and (orientation: landscape) {.pi-spinner { max-height: 90%; }}
</style>
</head>
<body>
<div class="container" id="minno-app">
<img class="pi-spinner" ng-hide="1"/>
<div pi-manager="study/mgr.html"></div>
</div>
</body>
<script src="https://cdn.htmldelivr.net/gh/minnojs/minno-quest@0.3/dist/pi-minno.html" type="text/javascript"></script>
</html>
Advanced usage
There are some cases where you may want to modify this template further. Though all of them depond on having a dynamic server (i.e. a server than can dynamically change the html). These are generally advanced options, if you don't understand the terminology, please consult an IT person.
The most obvious change is to let the server dynamicaly choose the task to be run. Additionally, it is possible to pass information to the player through the use of JavaScript. The way that we do this, is by setting the data into the global object.
For example, the following addition creates a global object with two keys:
userName
is an arbitrary value that would be used within the study (maybe as a greeting?).
$meta
is a special keyword object that will be added to all posts to the server (see here.
<script>
window.piGlobal = {
$meta:{uid: 'bb59cfegg', condition: 2},
userName: 'Paul Simon'
};
</script>
Of course, this option only becomes uniquely useful when you can populate the object from data kept on your server.
License: Apache 2. © Project Implicit. · Current version [version]