Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pet/Stroop
1 result
Show changes
Commits on Source (3)
Showing
with 2040 additions and 12 deletions
......@@ -24,7 +24,7 @@
-o-transition: all 0.5s ease;
background:#53868B;
height:100%;
min-height:100%;
width:370px;
position:fixed;
top:0;
......@@ -146,11 +146,11 @@ b{
top: 15%;
}
#formNome{
position: absolute;
width:calc(96% - 200px);
display: inline-block;
background: white;
top: 20%;
margin-top:10%;
left: 50%;
max-width: 50%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
......@@ -167,13 +167,13 @@ b{
}
#formTutorial{
position: absolute;
display: inline-block;
background: white;
left: 0%;
max-width: 30%;
padding-right: 1%;
float:left;
width:200px;
margin-right: 2%;
padding-left: 1%;
height: 100%;
min-height: 100%;
}
#voltar{
position:absolute;
......@@ -207,6 +207,11 @@ b{
width:100%;
height:100%;
}
#nome{
position:relative;
width:90%;
}
#FormularioTutorial{
position:absolute;
top:0;
......@@ -306,7 +311,7 @@ b{
left:0;
background-color:white;
width:100%;
height:100%;
min-height:100%;
}
......
......@@ -43,7 +43,7 @@
<button class="pure-button pure-button-primary" name="botao" onClick="tutorial();">Começar</button>
<br><br>
<a class="pure-button pure-button-primary" href="professor.html">Gerenciar Resultados</a>
<a class="pure-button pure-button-primary" id ="comecarBt" name="botao" href="professor.html">Gerenciar Resultados</a>
<br><br>
</fieldset>
</div>
......@@ -153,7 +153,9 @@
<div id="countdown" style="display:none;"></div>
<!-- SCRIPT DAS CONFIGURACOES !--> <script type="text/javascript" src="js/configuracoes.js"></script>
<!-- SCRIPT DO PRE-TESTE !--> <script type="text/javascript" src="js/script_pre_teste.js"></script>
......
node_modules
\ No newline at end of file
sudo: false
language: node_js
node_js:
- "node"
install: npm install
script:
- npm test
- gulp
cache:
directories:
- node_modules
The MIT License (MIT)
Copyright (c) 2013-2017 Blackrock Digital LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
# [Start Bootstrap - Simple Sidebar](https://startbootstrap.com/template-overviews/simple-sidebar/)
[Simple Sidebar](http://startbootstrap.com/template-overviews/simple-sidebar/) is an off canvas sidebar navigation template for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/).
## Preview
[![Simple Sidebar Preview](https://startbootstrap.com/assets/img/templates/simple-sidebar.jpg)](https://blackrockdigital.github.io/startbootstrap-simple-sidebar/)
**[View Live Preview](https://blackrockdigital.github.io/startbootstrap-simple-sidebar/)**
## Status
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/BlackrockDigital/startbootstrap-simple-sidebar/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/startbootstrap-simple-sidebar.svg)](https://www.npmjs.com/package/startbootstrap-simple-sidebar)
[![Build Status](https://travis-ci.org/BlackrockDigital/startbootstrap-simple-sidebar.svg?branch=master)](https://travis-ci.org/BlackrockDigital/startbootstrap-simple-sidebar)
[![dependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar/status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar)
[![devDependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar/dev-status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar?type=dev)
## Download and Installation
To begin using this template, choose one of the following options to get started:
* [Download the latest release on Start Bootstrap](https://startbootstrap.com/template-overviews/simple-sidebar/)
* Install via npm: `npm i startbootstrap-simple-sidebar`
* Clone the repo: `git clone https://github.com/BlackrockDigital/startbootstrap-simple-sidebar.git`
* [Fork, Clone, or Download on GitHub](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar)
## Usage
### Basic Usage
After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes. These are the only files you need to worry about, you can ignore everything else! To preview the changes you make to the code, you can open the `index.html` file in your web browser.
### Advanced Usage
After installation, run `npm install` and then run `gulp dev` which will open up a preview of the template in your default browser, watch for changes to core template files, and live reload the browser when changes are saved. You can view the `gulpfile.js` to see which tasks are included with the dev environment.
## Bugs and Issues
Have a bug or an issue with this template? [Open a new issue](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/issues) here on GitHub or leave a comment on the [template overview page at Start Bootstrap](http://startbootstrap.com/template-overviews/simple-sidebar/).
## Custom Builds
You can hire Start Bootstrap to create a custom build of any template, or create something from scratch using Bootstrap. For more information, visit the **[custom design services page](https://startbootstrap.com/bootstrap-design-services/)**.
## About
Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
* https://startbootstrap.com
* https://twitter.com/SBootstrap
Start Bootstrap was created by and is maintained by **[David Miller](http://davidmiller.io/)**, Owner of [Blackrock Digital](http://blackrockdigital.io/).
* http://davidmiller.io
* https://twitter.com/davidmillerskt
* https://github.com/davidtmiller
Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).
## Copyright and License
Copyright 2013-2017 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/gh-pages/LICENSE) license.
/*!
Pure v0.6.0
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
https://github.com/yahoo/pure/blob/master/LICENSE.md
*/
/*!
normalize.css v^3.0 | MIT License | git.io/normalize
Copyright (c) Nicolas Gallagher and Jonathan Neal
*/
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}.pure-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#444;color:rgba(0,0,0,.8);border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000\9}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#53868B;color:#fff}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=text]:focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129FEA}.pure-form input:not([type]):focus{outline:0;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus,.pure-form input[type=checkbox]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=text][disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=text],.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked input[type=file],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-aligned .pure-help-inline,.pure-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=text],.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=color]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message-inline,.pure-form-message{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none}.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-disabled,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0}
/*!
* Start Bootstrap - Simple Sidebar (https://startbootstrap.com/template-overviews/simple-sidebar)
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE)
*/
body {
overflow-x: hidden;
}
#wrapper {
padding-left: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
z-index: 1000;
position: fixed;
left: 250px;
width: 0;
height: 100%;
margin-left: -250px;
overflow-y: auto;
background: #000;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
width: 100%;
position: absolute;
padding: 15px;
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -250px;
}
/* Sidebar Styles */
.sidebar-nav {
position: absolute;
top: 0;
width: 250px;
margin: 0;
padding: 0;
list-style: none;
}
.sidebar-nav li {
text-indent: 20px;
line-height: 40px;
}
.sidebar-nav li a {
display: block;
text-decoration: none;
color: #999999;
}
.sidebar-nav li a:hover {
text-decoration: none;
color: #fff;
background: rgba(255, 255, 255, 0.2);
}
.sidebar-nav li a:active, .sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav>.sidebar-brand {
height: 65px;
font-size: 18px;
line-height: 60px;
}
.sidebar-nav>.sidebar-brand a {
color: #999999;
}
.sidebar-nav>.sidebar-brand a:hover {
color: #fff;
background: none;
}
@media(min-width:768px) {
#wrapper {
padding-left: 0;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
width: 0;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
padding: 20px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-right: 0;
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
select:focus,
textarea:focus,
input:focus {
font-size: 16px;
}
}
/* regra para o box-sizing */
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* regra para o clear float */
.cf:before,
.cf:after {content: " ";display: table;}
.cf:after {clear: both;}
.cf {*zoom: 1;}
#lateral {
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
background:#53868B;
min-height:100%;
width:370px;
position:fixed;
top:0;
z-index:2;
left:-320px;
}
#lateral:hover, #lateral:focus, #lateral:active {
overflow-y:scroll;
-moz-transform: translate(320px, 0);
-webkit-transform: translate(320px, 0);
-o-transform: translate(320px, 0);
transform: translate(320px, 0);
padding-right:0;
}
h2{
float: right;
margin-right: 10px;
}
#lateral .box {
list-style-type:none;
margin-bottom:1em;;
padding-bottom:1em;
}
#lateral h3 {
display:inline-block;
padding-bottom:0.2em;
margin: 2em 0 2em 0.81em;
color:rgb(255,255,255);
border-bottom: 4px solid rgb(155,155,155);
}
#menu {
position:relative;
margin:1em 0 1em -1em;
padding:0;
}
#menu li {padding:0; margin:0;}
#menu li a, #menu li a:link {
color:rgb(255,255,255);
text-decoration: none;
cursor:pointer;
padding: 2em 0 2em 2em;
display: block;
-moz-transition: all 1.2s ease;
-webkit-transition: all 1.2s ease;
-o-transition: all 1.2s ease;
transition: all 1.2s ease;cursor:pointer;
}
#menu li a:hover {
color:rgb(255,255,255);
background-color:rgba(255,255,255,0.2);
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#header{
z-index:10;
}
#form{
margin: 20px auto;
width: 700px;
height: 200px;
padding: 10px;
}
fieldset{
margin: 0 auto;
text-align: center;
padding: 10px;
}
#label{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#labelTutorialCongruente{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#labelTutorialIncongruente{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#conta{
text-align: center;
padding: 20px;
font-size: 10px;
}
#respostaC{
text-align: center;
padding: 20px;
font-size: 10px;
}
#respostaI{
text-align: center;
padding: 20px;
font-size: 10px;
}
b{
font-family: 'Source Sans Pro', sans-serif;
font-size: 30px;
}
#botoes{
position: absolute;
width: 100%;
top: 15%;
}
#formNome{
/*
width:calc(96% - 200px);
display: inline-block;
background: white;
margin-top:10%;
left: 50%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
*/
}
#tutorial{
position: absolute;
background: white;
top: 5%;
left: 5%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
}
#formTutorial{
display: inline-block;
background: white;
float:left;
width:200px;
margin-right: 2%;
padding-left: 1%;
min-height: 100%;
}
/*
#voltar{
position:absolute;
top:0;
left:0;
background-color:#A2B5CD;
width:100%;
height:100%;
}
*/
/*
#botao{
position: fixed;
background: white;
transform: translateY(-50%) translateX(-50%);
top: 50%;
left: 50%;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
padding-bottom: 30px;
border-radius: 30px;
text-align: center;
}
*/
#conta{
text-align: center;
}
/*
#FormularioNome{
position:absolute;
top:0;
left:0;
background-color:#A2B5CD;
width:100%;
height:100%;
}
*/
#nome{
position:relative;
width:90%;
}
/*
#FormularioTutorial{
position:absolute;
top:0;
left:0;
width:100%;
min-height: 150%;
}
*/
@media screen and (max-width: 450px) {
[class*="button-"] {
display: block;
width: 105px;
margin-left: 50%;
margin-bottom: 10px;
transform: translateX(-50%);
}
}
.button-verde {
background: rgb(28, 184, 65); /* this is a green */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-vermelho {
background: rgb(202, 60, 60); /* this is a maroon */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-azul {
background: rgb(18, 83, 173); /* this is a light blue */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-roxo {
background: rgb(143, 48, 153); /* roxo*/
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-marrom {
background: #000000; /*Marrom*/
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.pure-menu-selected{
outline-width:1px;
margin:1px;
padding:1px;
outline-style:solid;
outline-color: rgba(0,0,0,0.5);
}
#horizontal{
/*
background: #53868B;
*/
margin:20px;
}
#graficoC
{
z-index: 1;
}
#graficoI
{
z-index: 1;
}
#graficoIMedia
{
z-index: 1;
}
#graficoCMedia
{
z-index: 1;
}
#corpoConfig{
position: absolute;
background-color: white;
top: 10%;
left:40%;
border-radius: 30px;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
padding-bottom: 30px;
}
#corpoGerencia{
position: absolute;
top: 10%;
left:40%;
border-radius: 30px;
}
#externa{
position:absolute;
top:100px;
left:0;
background-color:white;
width:100%;
min-height:100%;
}
#boxDeBotoes {
text-align: center;
}
#boxDeBotoesTutorialCongruente {
text-align: center;
}
#countdown {
position: absolute;
}
.divider {
border-width:0px;
border-bottom-width:1px;
border-color:rgba(0,0,0,0.3);
border-style:solid;
}
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var pkg = require('./package.json');
// Copy vendor files from /node_modules into /vendor
// NOTE: requires `npm install` before running!
gulp.task('copy', function() {
gulp.src([
'node_modules/bootstrap/dist/**/*',
'!**/npm.js',
'!**/bootstrap-theme.*',
'!**/*.map'
])
.pipe(gulp.dest('vendor/bootstrap'))
gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js'])
.pipe(gulp.dest('vendor/jquery'))
})
// Default task
gulp.task('default', ['copy']);
// Configure the browserSync task
gulp.task('browserSync', function() {
browserSync.init({
server: {
baseDir: ''
},
})
})
// Dev task with browserSync
gulp.task('dev', ['browserSync'], function() {
// Reloads the browser whenever HTML or CSS files change
gulp.watch('css/*.css', browserSync.reload);
gulp.watch('*.html', browserSync.reload);
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Teste stroop </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/pure-min.css">
<link rel="stylesheet" href="css/style.css">
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="js/jquery-3.1.1.min.js"></script>
<script src='js/plotly-latest.min.js'></script>
<script src="js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/simple-sidebar.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<!--
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Start Bootstrap
</a>
</li>
<li>
<a href="#">Dashboard</a>
</li>
<li>
<a href="#">Shortcuts</a>
</li>
<li>
<a href="#">Overview</a>
</li>
<li>
<a href="#">Events</a>
</li>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</div>
-->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div id="FormularioNome" class="container-fluid">
<div class="container-fluid divider">
<center><p><b>Instruções!</b></p><br></center>
1) Preencha seu nome
<br><br>
2) No campo Grupo preencha o grupo correspondente:
<br>
&nbsp;&nbsp;&nbsp;&nbsp;1 para Normal
<br>
&nbsp;&nbsp;&nbsp;&nbsp;2 para Meditação
<br><br>
3) Clique em "Começar" para iniciar o teste.
<br><br>
</div>
<br>
<div id ="formNome" class="pure-form pure-form-aligned">
<center><p><b>Olá!</b></p> Bem vindo ao teste Stroop.<br>
Antes de começar, precisamos de alguns dados:
<br><br>
</center>
<input id="nome" name="nome" type="text" placeholder="Nome" class="pure-input-rounded">
<br><br>
<label for="grupo">Grupo</label>
<br><br>
<input id="grupo_1" name="grupo" type="radio" value=1 class="checkbox-inline" checked=true> Grupo 1 (Normal)
<br>
<input id="grupo_2" name="grupo" type="radio" value=2 class="checkbox-inline"> Grupo 2 (Meditaçao)
<br>
<br>
<center>
<button class="btn btn-secondary" name="botao" onClick="tutorial();">Começar</button>
<br><br>
<a class="btn btn-secondary" href="professor.html">Gerenciar Resultados</a>
<br><br>
</center>
</div>
</div>
</div>
<!--
<a href="#menu-toggle" class="btn btn-secondary">Toggle Menu</a>
-->
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!--*******************************************************************************************!-->
<div id="FormularioTutorial" class="container-fluid" style="display:none;">
<div class="pure-form" id="tutorial">
<center><p><b>Tutorial!</b></p><br></center>
&nbsp;&nbsp;1)Ao clicar no botão “Iniciar” você começará a relacionar a cor da palavra com o botão correspondente da mesma.
<br><br>
&nbsp;&nbsp;2)Durante o teste, as questões poderão ser congruentes ou incongruentes.
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;Nas congruentes, as palavras estarão coloridas com a cor que representam (verde escrito com a cor verde).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Use o exemplo abaixo para treinar.
<div id="tutorialCongruente" style="display:block;">
<p id ="labelTutorialCongruente"></p>
<div id="boxDeBotoesTutorialCongruente">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicouTutorialC("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicouTutorialC("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicouTutorialC("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicouTutorialC("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicouTutorialC("marrom") />
</div>
<div id="respostaC"></div>
</div>
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;Nas incongruentes as palavras não estarão necessariamente coloridas com a sua cor (palavra verde colorida com a cor vermelha).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Use o exemplo abaixo para treinar.
<div id="tutorialIncongruente" style="display:block;">
<p id ="labelTutorialIncongruente"></p>
<div id="boxDeBotoesTutorialCongruente">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicouTutorialI("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicouTutorialI("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicouTutorialI("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicouTutorialI("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicouTutorialI("marrom") />
</div>
<div id="respostaI"></div>
</div>
<br><br>
&nbsp;&nbsp;3)Na série seguinte você fará a mesma coisa com a diferença de a palavra não será correspondente a cor.
<br><br>
&nbsp;&nbsp;4) Haverá pausas de 5 segundos ao longo do teste.
<br><br>
&nbsp;&nbsp;5) Não feche o navegador enquanto realiza o teste.
<br><br>
&nbsp;&nbsp;6) Ao fim do teste, pode liberar o aparelho para o responsável.
<br><br>
<center>
<button class="btn btn-secondary" name="botao" onClick="iniciar();">Iniciar</button>
</center>
<br><br>
</div>
</div>
<!--*******************************************************************************************!-->
<div class="pure-form" id="corpo" style="display:none;">
<div id="botoes" style="display:block;">
<p id ="label"></p>
<div id="boxDeBotoes">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicou("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicou("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicou("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicou("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicou("marrom") />
</div>
</br>
</br>
<div id="conta"></div>
</div>
<div id="final">
<input type="hidden" value='a' id ="nome"/>
<input type="hidden" value='a' id ="grupo"/>
</div>
<div class="container-fluid" id="voltar" style="display:none" >
<center>
<h1>Fim do teste Stroop</h1>
</center>
</br>
</br>
<center>
<input type="button" class="btn btn-secondary" value="Voltar ao início" onclick=voltar() />
</center>
<br><br>
<div id="mostra_resultados"></div>
</div>
</div>
<!--*******************************************************************************************!-->
<br>
<div id="countdown" style="display:none;"></div>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- SCRIPT DAS CONFIGURACOES !--> <script type="text/javascript" src="js/configuracoes.js"></script>
<!-- SCRIPT DO PRE-TESTE !--> <script type="text/javascript" src="js/script_pre_teste.js"></script>
<!-- SCRIPT DO TESTE !--> <script type="text/javascript" src="js/script.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<!-- Menu Toggle Script -->
<!--
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
-->
</body>
</html>
/*
Para usar este modulo, utilize:
getConfiguracoes() : Retorna um dicionario com as configuracoes do programa
__saveConfigs() : Salva as configuracoes do programa
Caso seja necessario adicionar novas configuracoes, adicione nos dois dicionarios abaixo (__configsDefault e __configs)
*/
var numeroTestes = 0;
var __configsDefault = {
"ordemBateria": ["pC","C","C", "pI", "I","I","F"],
"perguntas": 6,
"perguntasPre": 6,
"tipoTeste": 0, //1 para tempo, 0 para perguntas
"tempoTeste" : 5, //Segundos
"tempoEntreTeste": 5
};
var __configs = {
"perguntas": null,
"perguntasPre": null,
"ordemBateria": null,
"tipoTeste": null,
"tempoTeste" : null,
"tempoEntreTeste": null,
};
function __saveConfigs(){
for(var x in __configs){
localStorage[x] = JSON.stringify(__configs[x]);
}
}
function __init(){
for(var x in __configs){
if(localStorage[x] != undefined){
//console.log(localStorage[x]);
__configs[x] = JSON.parse(localStorage[x]);
}
else{
__configs[x] = __configsDefault[x];
}
}
}
__init();
function getConfiguracoes(){
return __configs;
}
//console.log(getConfiguracoes());
function config_selectPerguntas(){
__configs.tipoTeste = 0;
$("#config_perguntas").css("display","inline");
$("#config_tempo").css("display","none");
}
function config_selectTempo(){
__configs.tipoTeste = 1;
$("#config_tempo").css("display","inline");
$("#config_perguntas").css("display","none");
}
function logado_config_addTeste(){
var ordem = document.getElementById("logado_config_selects");
var all = document.createElement("DIV");
all.id = "config_select_all"+numeroTestes;
var select = document.createElement("SELECT");
select.id = "config_select"+numeroTestes;
var option;
option = document.createElement("option");
option.text = "Congruente";
option.value = "C";
select.options.add(option);
option = document.createElement("option");
option.text = "Incongruente";
option.value = "I";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Congruente";
option.value = "pC";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Incongruente";
option.value = "pI";
select.options.add(option);
$(select).addClass("btn");
$(select).addClass("btn-secondary");
all.appendChild(select);
var buttonRemove = document.createElement("button");
buttonRemove.type = "button";
buttonRemove.value = numeroTestes;
buttonRemove.innerHTML="X";
buttonRemove.onclick = function(){
var value = this.value;
var all = document.getElementById("config_select_all"+value);
ordem.removeChild(all);
}
$(buttonRemove).addClass("btn");
$(buttonRemove).addClass("btn-secondary");
all.appendChild(buttonRemove);
all.appendChild(document.createElement("BR"));
numeroTestes++;
ordem.appendChild(all);
return select;
}
function configuracoes(){
paginaAtual = "config";
document.getElementById("logado_config_selects").innerHTML = "";
document.getElementById("logado_config_numero_perguntas").value = __configs.perguntas;
document.getElementById("logado_config_tempoEntreTeste").value = __configs.tempoEntreTeste;
document.getElementById("logado_config_numero_perguntas_pre").value = __configs.tempoEntreTeste;
if(__configs.tipoTeste == 0){
config_selectPerguntas();
}
else{
config_selectTempo();
}
$("#logado_config_tempoDuracao").val(__configs.tempoTeste);
for(var t in __configs.ordemBateria){
if(__configs.ordemBateria[t] == "F"){
break;
}
var select = logado_config_addTeste();
for(var op in select.options){
if(select.options[op].value == __configs.ordemBateria[t]){
select.selectedIndex = op;
}
}
}
loadPage();
}
function salvaTestes(){
localStorage.dataSet = JSON.stringify(dataSet);
}
function logado_config_salvaConfig(){
if(confirm("Fazendo isso você deletará todos os testes!\nDeseja continuar?")){
__configs.perguntas = parseInt(document.getElementById("logado_config_numero_perguntas").value);
__configs.perguntasPre = parseInt(document.getElementById("logado_config_numero_perguntas_pre").value);
__configs.tempoTeste = parseInt($("#logado_config_tempoDuracao").val());
__configs.tempoEntreTeste = parseInt($("#logado_config_tempoEntreTeste").val());
newOrdemBateria = []
for(var i = 0; i < numeroTestes; i++){
var select = document.getElementById("config_select"+i);
if(select){
var v = select.options[select.selectedIndex].value;
newOrdemBateria.push(v);
}
}
newOrdemBateria.push("F");
__configs.ordemBateria = newOrdemBateria;
__saveConfigs();
dataSet = [];
salvaTestes();
location.reload();
}
}
function downloadCsv(){
var tempos = []
for (var teste in dataSet){
tempos.push(buscaTempoResposta(dataSet[teste].stringResposta[0]));
}
var data = tempos;
var csvContent = "data:text/csv;charset=utf-8,";
if(dataSet.length < 1){
alert("Não há nenhum teste registrado!");
return;
}
ordemFiltrada = filtraOrdemBateria(dataSet[0].ordemBateria);
function scpAspas(t){
return "\""+t+"\"";
}
var tabela = [];
tabela.push([]);
tabela[0][0] = "\"\"";
var congruenteIndex = [];
var incongruenteIndex = [];
for(i in ordemFiltrada){
if(ordemFiltrada[i] == "C"){
congruenteIndex.push(parseInt(i));
//tabela[0].push(","+scapeAspasSimples(ordemFiltrada[i]));
}
if(ordemFiltrada[i] == "I"){
incongruenteIndex.push(parseInt(i));
}
}
var numCongruentes = congruenteIndex.length;
var numIncongruentes = incongruenteIndex.length;
for(var i = 0; i < numCongruentes; i++){
tabela[0].push(",\"C "+(i+1)+"\"");
}
tabela[0].push(",\"Média C\",\"Dev Pad C\", \"Erro C\", \"Acertos C\"");
for(var i = 0; i < numCongruentes; i++){
tabela[0].push(",\"C M"+(i+1)+"\"");
}
tabela[0].push(",\"Média C M \",\"Dev Pad C M\", \"Erro C M\", \"Acertos C M\"");
for(var i = 0; i < numIncongruentes; i++){
tabela[0].push(",\"I "+(i+1)+"\"");
}
tabela[0].push(",\"Média I\",\"Dev Pad I\", \"Erro I\", \"Acertos I\"");
for(var i = 0; i < numIncongruentes; i++){
tabela[0].push(",\"I M"+(i+1)+"\"");
}
tabela[0].push(",\"Média I M \",\"Dev Pad I M\", \"Erro I M\", \"Acertos I M\"");
var dicionario = {}
for(var i in dataSet){
if(dataSet[i].nome in dicionario){
dicionario[dataSet[i].nome].push(dataSet[i]);
}
else{
dicionario[dataSet[i].nome] = [dataSet[i]];
}
}
function mediaTeste(teste){
var acertos = 0;
var soma = 0;
for(var i in teste){
if(teste[i].acertou){
soma+=parseFloat(teste[i].tempo);
acertos++;
}
//console.log(teste[i]);
}
var media = 0;
if(acertos > 0){
media = (soma/acertos);
}
return {media: media, acertos: acertos};
}
for(p in dicionario){
var line = [p];
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 1){
for(var j in congruenteIndex){
var index = congruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
line.push(","+scpAspas(media.media))
}
}
}
line.push(",\"\""); //media
line.push(",\"\""); //desvio padrao
line.push(",\"\""); //erro
line.push(","+scpAspas(acertosTotais));
tabela.push(line);
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 2){
for(var j in congruenteIndex){
var index = congruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media))
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 1){
for(var j in incongruenteIndex){
var index = incongruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media));
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 2){
for(var j in incongruenteIndex){
var index = incongruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media))
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
for(var l in tabela){
csvContent+= tabela[l].join("")+"\n";
}
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.csv");
document.body.appendChild(link); // Required for FF
link.click(); // This will download the data file named "my_data.csv".
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* http://plugins.jquery.com/validate */
;(function(a,b,c,d){var e=['input:not([type]),input[type="color"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="email"],input[type="file"],input[type="hidden"],input[type="month"],input[type="number"],input[type="password"],input[type="range"],input[type="search"],input[type="tel"],input[type="text"],input[type="time"],input[type="url"],input[type="week"],textarea',"select",'input[type="checkbox"],input[type="radio"]'],f=e.join(","),g={},h=function(a,c){var f={pattern:!0,conditional:!0,required:!0},h=b(this),i=h.val()||"",j=h.data("validate"),k=j!==d?g[j]:{},l=h.data("prepare")||k.prepare,m=h.data("pattern")||("regexp"==b.type(k.pattern)?k.pattern:/(?:)/),n=h.attr("data-ignore-case")||h.data("ignoreCase")||k.ignoreCase,o=h.data("mask")||k.mask,p=h.data("conditional")||k.conditional,q=h.data("required"),r=h.data("describedby")||k.describedby,s=h.data("description")||k.description,t=h.data("trim"),u=/^(true|)$/i,v=/^false$/i,s=b.isPlainObject(s)?s:c.description[s]||{};if(q=""!=q?q||!!k.required:!0,t=""!=t?t||!!k.trim:!0,u.test(t)&&(i=b.trim(i)),b.isFunction(l)?i=l.call(h,i)+"":b.isFunction(c.prepare[l])&&(i=c.prepare[l].call(h,i)+""),"regexp"!=b.type(m)&&(n=!v.test(n),m=n?RegExp(m,"i"):RegExp(m)),p!=d)if(b.isFunction(p))f.conditional=!!p.call(h,i,c);else for(var x=p.split(/[\s\t]+/),y=0,z=x.length;z>y;y++)c.conditional.hasOwnProperty(x[y])&&!c.conditional[x[y]].call(h,i,c)&&(f.conditional=!1);if(q=u.test(q),q&&(h.is(e[0]+","+e[1])?!i.length>0&&(f.required=!1):h.is(e[2])&&(h.is("[name]")?0==b('[name="'+h.prop("name")+'"]:checked').length&&(f.required=!1):f.required=h.is(":checked"))),h.is(e[0]))if(m.test(i)){if("keyup"!=a.type&&o!==d){for(var A=i.match(m),B=0,z=A.length;z>B;B++)o=o.replace(RegExp("\\$\\{"+B+"(?::`([^`]*)`)?\\}","g"),A[B]!==d?A[B]:"$1");o=o.replace(/\$\{\d+(?::`([^`]*)`)?\}/g,"$1"),m.test(o)&&h.val(o)}}else q?f.pattern=!1:i.length>0&&(f.pattern=!1);var C=b('[id="'+r+'"]'),D=s.valid;return C.length>0&&"keyup"!=a.type&&(f.required?f.pattern?f.conditional||(D=s.conditional):D=s.pattern:D=s.required,C.html(D||"")),"function"==typeof k.each&&k.each.call(h,a,f,c),c.eachField.call(h,a,f,c),f.required&&f.pattern&&f.conditional?(c.waiAria&&h.prop("aria-invalid",!1),"function"==typeof k.valid&&k.valid.call(h,a,f,c),c.eachValidField.call(h,a,f,c)):(c.waiAria&&h.prop("aria-invalid",!0),"function"==typeof k.invalid&&k.invalid.call(h,a,f,c),c.eachInvalidField.call(h,a,f,c)),f};b.extend({validateExtend:function(a){return b.extend(g,a)},validateSetup:function(c){return b.extend(a,c)}}).fn.extend({validate:function(c){return c=b.extend({},a,c),b(this).validateDestroy().each(function(){var a=b(this);if(a.is("form")){a.data(name,{options:c});var d=a.find(f),g=c.namespace;a.is("[id]")&&(d=d.add('[form="'+a.prop("id")+'"]').filter(f)),d=d.filter(c.filter),c.onKeyup&&d.filter(e[0]).on("keyup."+g,function(a){h.call(this,a,c)}),c.onBlur&&d.on("blur."+g,function(a){h.call(this,a,c)}),c.onChange&&d.on("change."+g,function(a){h.call(this,a,c)}),c.onSubmit&&a.on("submit."+g,function(e){var f=!0;d.each(function(){var a=h.call(this,e,c);a.pattern&&a.conditional&&a.required||(f=!1)}),f?(c.sendForm||e.preventDefault(),b.isFunction(c.valid)&&c.valid.call(a,e,c)):(e.preventDefault(),b.isFunction(c.invalid)&&c.invalid.call(a,e,c))})}})},validateDestroy:function(){var a=b(this),c=a.data(name);if(a.is("form")&&b.isPlainObject(c)&&"string"==typeof c.options.nameSpace){var d=a.removeData(name).find(f).add(a);a.is("[id]")&&(d=d.add(b('[form="'+a.prop("id")+'"]').filter(f))),d.off("."+c.options.nameSpace)}return a}})})({sendForm:!0,waiAria:!0,onSubmit:!0,onKeyup:!1,onBlur:!1,onChange:!1,nameSpace:"validate",conditional:{},prepare:{},description:{},eachField:$.noop,eachInvalidField:$.noop,eachValidField:$.noop,invalid:$.noop,valid:$.noop,filter:"*"},jQuery,window);
\ No newline at end of file
;(function ($, window, document, undefined) {
var pluginName = "countdown360",
defaults = {
radius: 15.5, // radius of arc
strokeStyle: "#477050", // the color of the stroke
strokeWidth: undefined, // the stroke width, dynamically calulated if omitted in options
fillStyle: "#8ac575", // the fill color
fontColor: "#477050", // the font color
fontFamily: "sans-serif", // the font family
fontSize: undefined, // the font size, dynamically calulated if omitted in options
fontWeight: 700, // the font weight
autostart: true, // start the countdown automatically
seconds: 10, // the number of seconds to count down
label: ["second", "seconds"], // the label to use or false if none
startOverAfterAdding: true, // Start the timer over after time is added with addSeconds
smooth: false, // should the timer be smooth or stepping
onComplete: function () {}
};
function Plugin(element, options) {
this.element = element;
this.settings = $.extend({}, defaults, options);
if (!this.settings.fontSize) { this.settings.fontSize = this.settings.radius/1.2; }
if (!this.settings.strokeWidth) { this.settings.strokeWidth = this.settings.radius/4; }
this._defaults = defaults;
this._name = pluginName;
this._init();
}
Plugin.prototype = {
getTimeRemaining: function()
{
var timeRemaining = this._secondsLeft(this.getElapsedTime());
return timeRemaining;
},
getElapsedTime: function()
{
return Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
},
extendTimer: function (value) {
var seconds = parseInt(value),
secondsElapsed = Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
if ((this._secondsLeft(secondsElapsed) + seconds) <= this.settings.seconds) {
this.startedAt.setSeconds(this.startedAt.getSeconds() + parseInt(value));
}
},
addSeconds: function (value) {
var secondsElapsed = Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
if (this.settings.startOverAfterAdding) {
this.settings.seconds = this._secondsLeft(secondsElapsed) + parseInt(value);
this.start();
} else {
this.settings.seconds += parseInt(value);
}
},
start: function () {
this.startedAt = new Date();
this._drawCountdownShape(Math.PI*3.5, true);
this._drawCountdownLabel(0);
var timerInterval = 1000;
if (this.settings.smooth) {
timerInterval = 16;
}
this.interval = setInterval(jQuery.proxy(this._draw, this), timerInterval);
},
stop: function (cb) {
clearInterval(this.interval);
if (cb) { cb(); }
},
_init: function () {
this.settings.width = (this.settings.radius * 2) + (this.settings.strokeWidth * 2);
this.settings.height = this.settings.width;
this.settings.arcX = this.settings.radius + this.settings.strokeWidth;
this.settings.arcY = this.settings.arcX;
this._initPen(this._getCanvas());
if (this.settings.autostart) { this.start(); }
},
_getCanvas: function () {
var $canvas = $("<canvas id=\"countdown360_" + $(this.element).attr("id") + "\" width=\"" +
this.settings.width + "\" height=\"" +
this.settings.height + "\">" +
"<span id=\"countdown-text\" role=\"status\" aria-live=\"assertive\"></span></canvas>");
$(this.element).prepend($canvas[0]);
return $canvas[0];
},
_initPen: function (canvas) {
this.pen = canvas.getContext("2d");
this.pen.lineWidth = this.settings.strokeWidth;
this.pen.strokeStyle = this.settings.strokeStyle;
this.pen.fillStyle = this.settings.fillStyle;
this.pen.textAlign = "center";
this.pen.textBaseline = "middle";
this.ariaText = $(canvas).children("#countdown-text");
this._clearRect();
},
_clearRect: function () {
this.pen.clearRect(0, 0, this.settings.width, this.settings.height);
},
_secondsLeft: function(secondsElapsed) {
return this.settings.seconds - secondsElapsed;
},
_drawCountdownLabel: function (secondsElapsed) {
this.ariaText.text(secondsLeft);
this.pen.font = this.settings.fontWeight + " " + this.settings.fontSize + "px " + this.settings.fontFamily;
var secondsLeft = this._secondsLeft(secondsElapsed),
label = secondsLeft === 1 ? this.settings.label[0] : this.settings.label[1],
drawLabel = this.settings.label && this.settings.label.length === 2,
x = this.settings.width/2;
if (drawLabel) {
y = this.settings.height/2 - (this.settings.fontSize/6.2);
} else {
y = this.settings.height/2;
}
this.pen.fillStyle = this.settings.fillStyle;
this.pen.fillText(secondsLeft + 1, x, y);
this.pen.fillStyle = this.settings.fontColor;
this.pen.fillText(secondsLeft, x, y);
if (drawLabel) {
this.pen.font = "normal small-caps " + (this.settings.fontSize/3) + "px " + this.settings.fontFamily;
this.pen.fillText(label, this.settings.width/2, this.settings.height/2 + (this.settings.fontSize/2.2));
}
},
_drawCountdownShape: function (endAngle, drawStroke) {
this.pen.fillStyle = this.settings.fillStyle;
this.pen.beginPath();
this.pen.arc(this.settings.arcX, this.settings.arcY, this.settings.radius, Math.PI*1.5, endAngle, false);
this.pen.fill();
if (drawStroke) { this.pen.stroke(); }
},
_draw: function () {
var millisElapsed, secondsElapsed;
millisElapsed = new Date().getTime() - this.startedAt.getTime();
secondsElapsed = Math.floor((millisElapsed)/1000);
endAngle = (Math.PI*3.5) - (((Math.PI*2)/(this.settings.seconds * 1000)) * millisElapsed);
this._clearRect();
this._drawCountdownShape(Math.PI*3.5, false);
if (secondsElapsed < this.settings.seconds) {
this._drawCountdownShape(endAngle, true);
this._drawCountdownLabel(secondsElapsed);
} else {
this._drawCountdownLabel(this.settings.seconds);
this.stop();
this.settings.onComplete();
}
}
};
$.fn[pluginName] = function (options) {
var plugin;
this.each(function() {
plugin = $.data(this, "plugin_" + pluginName);
if (!plugin) {
plugin = new Plugin(this, options);
$.data(this, "plugin_" + pluginName, plugin);
}
});
return plugin;
};
})(jQuery, window, document);
This diff is collapsed.
var dataSet = [];
var localStoreLigado = false;
if (typeof(Storage) !== "undefined") {
localStoreLigado=true;
if(localStorage.getItem("dataSet") != null){
dataSet = JSON.parse(localStorage.dataSet);
}
}
//Mantem em "cache" o login e senha
var login = null;
var senha = null;
//Contem a estrutura de todos as informacoes necessarias para o professor (array de baterias de testes)
var dados = dataSet;
//console.log(dados);
var objeto_ativo = null; //Objeto (HTML) ativo na gerencia de testes
/*
Informa a interface do html:
"main" : interface de login ou de gráficos
"gerenciar" : interface de gerencia de testes (excluir, ver resultados)
*/
var paginaAtual = "main";
//Tenta logar com os valores dos inputs do formulario HTML
function loadPage(){
document.getElementById("logado_main").style.display = "none";
document.getElementById("logado_gerenciar").style.display = "none";
document.getElementById("logado_config").style.display = "none";
document.getElementById("logado_"+paginaAtual).style.display = "inline";
}
loadPage();
//Requisita os testes ligado a esse professor ao servidor e armazena a resposta em dados
//Obs: É assíncrono
function buscaTestes(){
dados = dataSet;
geraGraficos();
geraDadosGerenciar();
loadPage();
}
//Função chamada para carregar a aba de gerencia de testes
function geraDadosGerenciar(){
if(paginaAtual == "gerenciar"){
document.getElementById("gerencia_testes").innerHTML="";
for(var i = 0; i < dados.length; i++){
document.getElementById("gerencia_testes").innerHTML+=
"<span class='btn btn-secondary' onClick=abre_informacao_teste(this); id_teste="+i+">"+dados[i].nome+"</span> <span class='btn btn-secondary exclueTeste' onClick='exclueTeste("+i+");'>X</span><br><br>";
}
}
}
//Requisita ao servidor para excluir determinado teste do professor logado
function exclueTeste(index){
dataSet.splice(index,1);
buscaTestes();
salvaTestes();
}
//Desativa a interface ativada (main ou gerencia de testes)
function desativa_objeto_ativo(){
if(!objeto_ativo)
return;
objeto_ativo.innerHTML = dados[1*objeto_ativo.getAttribute("id_teste")].nome;
objeto_ativo = null;
}
//Retorna array com C e I na ordem original (somente os testes "validos")
function filtraOrdemBateria(array){
return array.filter(function(element){
return element !== "pC" && element !== "pI" && element !== "F";
});
}
//Imprime na tela o conteúdo referente a aba de gerencia de testes
function abre_informacao_teste(obj){
if(objeto_ativo == obj){
desativa_objeto_ativo();
return;
}
obj.innerHTML = "<center>";
/* Percorre a estrutura de dados que é definida no script.js que contém todas as informações referentes a 1 teste*/
obj.innerHTML+= dados[1*obj.getAttribute("id_teste")].nome+"<br>";
obj.innerHTML+= "Grupo "+dados[1*obj.getAttribute("id_teste")].grupo+"<br>";
ordemFiltrada = filtraOrdemBateria(dados[1*obj.getAttribute("id_teste")].ordemBateria);
//Para cada resposta de cada teste
for(var i = 0; i < dados[1*obj.getAttribute("id_teste")].stringResposta.length; i++){
obj.innerHTML+="<br>"
if(ordemFiltrada[i] == "C")
obj.innerHTML+="Congruente";
if(ordemFiltrada[i] == "I")
obj.innerHTML+="Incongruente";
obj.innerHTML+="<br>";
var mediaC=0;
var mediaI=0;
var acertos = 0;
for(var j = 0; j < dados[1*obj.getAttribute("id_teste")].stringResposta[i].length; j++){
/*Escreve na tela ( em forma de botões ) se a pessoa acertou, e o seu tempo, alterando a classe de cada uma para :
- spanAcertou
- spanErrou
*/
if(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].acertou == "1"){
obj.innerHTML += "<span class=spanAcertou>" + dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo+"</span><br>";
if(ordemFiltrada[i] == "C"){
mediaC = parseFloat(mediaC) + parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo);
}
else{
mediaI = parseFloat(mediaI) + parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo);
}
acertos++;
}
else{
obj.innerHTML += "<span class=spanErrou>" + dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo+"</span><br>";
}
}
if(mediaI == 0)
{
obj.innerHTML += "<br>Média Congruente<br>";
mediaC = parseFloat(mediaC) / acertos;
obj.innerHTML += "<span class=spanAcertou>" + parseFloat(mediaC.toFixed(2))+"</span><br>";
}
else {
obj.innerHTML += "<br>Média Incongruente<br>";
mediaI = parseFloat(mediaI) / acertos;
obj.innerHTML += "<span class=spanAcertou>" + parseFloat(mediaI.toFixed(2))+"</span><br>";
}
desvioPadrao = 0;
for(var j = 0; j < dados[1*obj.getAttribute("id_teste")].stringResposta[i].length; j++){
if(mediaI == 0)
{
quadrado = (( parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo) ) - parseFloat(mediaC)) * (parseFloat( parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo) - parseFloat(mediaC)));
desvioPadrao = parseFloat(desvioPadrao) + quadrado;
}
else {
desvioPadrao = parseFloat(desvioPadrao) + ( (parseFloat( parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo)) - parseFloat(mediaI)) * (parseFloat( parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i][j].tempo) ) - parseFloat(mediaI)) );
}
}
desvioPadrao = parseFloat(desvioPadrao) / parseFloat(dados[1*obj.getAttribute("id_teste")].stringResposta[i].length);
desvioPadrao = parseFloat(Math.sqrt(parseFloat(desvioPadrao)) );
obj.innerHTML += "<br>Desvio Padrão<br>";
obj.innerHTML += "<span class=spanAcertou>" + parseFloat(desvioPadrao.toFixed(2))+"</span><br>";
if(j < dados[1*obj.getAttribute("id_teste")].stringResposta[i].length-1)
obj.innerHTML +="<br>";
}
obj.innerHTML += "</center>";
objeto_ativo = obj;
}
/*Função que plota o gráfico de qualquer teste
parametros:
* indice = indice do teste que se deseja plotar (int)
* idHTML = Nome que se dará ao gráfico (string)
Ex1 : Congruente 1
Ex2 : Incongruente 1
Obs: Se dados for nulo, não sera pplotado nenhum gráfico
*/
function range(x){
var ret = [];
for(var i = 1; i <= x; i++){
ret.push(i);
}
return ret;
}
function plotaGraficoX(/*vetX,vetY */indice,idHTML, grafico){
var vetLinhas = [];
var j;
for(var i = 0; i < dados.length; i++){
//Linhas
var auxVetY = [];
var auxVetX = [];
var rgb = [];
// var colorAux = 10;
for(j = 0; j < dados[i].stringResposta[indice].length; j++){
if(dados[i].stringResposta[indice][j].acertou){ // Acertou
auxVetX.push(j+1);
auxVetY.push(dados[i].stringResposta[indice][j].tempo);
rgb.push('rgb(31,119,180)');
} else {
auxVetX.push(j+1);
auxVetY.push(dados[i].stringResposta[indice][j].tempo);
rgb.push('rgb(180,30,31)');
}
}
vetLinhas[vetLinhas.length] = {
x: auxVetX,
y: auxVetY,
type: 'bar',
marker: { color: rgb },
name: dados[i].nome
};
}
var node = document.createElement("CENTER");
node.id = idHTML;
//document.getElementById("logado_main").innerHTML += "<center>"+idHTML+"</center>";
document.getElementById("logado_main").appendChild(node);//idHTML+"<br><center id='"+idHTML+"'></center>"
Plotly.newPlot(idHTML, vetLinhas,{title:idHTML,showlegend: false});
vetLinhas = [];
auxVetY = [];
auxVetX = [];
rgb = [];
}
function plotaGraficoMedia(graficoGlobal, indice,idHTML, grafico){
var vetLinhas = [];
var media = [];
var acertos = [];
var acertosAbsolutos=0;
var quantidadePergunatasAbsolutas =0;
var quantidadeTestes= 0;
var quantidadePerguntas =0;
quantidadePerguntas = graficoGlobal[0].length;
quantidadeTestes = graficoGlobal.length/indice;
for(var i=0; i< quantidadePerguntas; i++){
media[i] = 0;
acertos[i] =0;
}
for(var i = 0; i < graficoGlobal.length; i++){
var tempos = buscaTempoResposta(graficoGlobal[i]);
for(var j=0; j< tempos.length; j++){
if(graficoGlobal[i][j].acertou)
{
media[j] = parseFloat(media[j]) + parseFloat(tempos[j]);
acertos[j] +=1;
acertosAbsolutos+=1;
}
quantidadePergunatasAbsolutas+=1;
}
}
for(var i=0; i< tempos.length; i++){
if(acertos[i] != 0)
{
media[i] = parseFloat(media[i])/parseFloat(acertos[i]);
}
}
vetLinhas[vetLinhas.length] = {
x: range(media.length),
y: media,
type: 'bar',
//mode:'lines+markers',
name: "media"
};
var node = document.createElement("CENTER");
node.id = idHTML;
node.class = "divGrafico";
document.getElementById("logado_main").appendChild(node);
Plotly.newPlot(idHTML, vetLinhas, {
title: idHTML,
annotations: [ {
xref: 'paper',
yref: 'paper',
x: 1,
xanchor: 'bottom',
y: 1.1,
yanchor: 'right',
text: 'Quantidade total: '+quantidadePergunatasAbsolutas+' Quantidade acertos: '+acertosAbsolutos,
showarrow: false
}]
});
vetLinhas = [];
}
//Percorre os testes do professor e os plota de acordo com a congruencia
function geraGraficos(){
if(!dados)
return;
$("#logado_main center" ).remove();
if(!dados.length)
{
//alert("Não nenhum teste registrado!");
return;
}
var congruentes = 0;
var incongruentes = 0;
var graficoGlobalC = [];
var graficoGlobalI = [];
var grupos = [];
for(var i=0; i < dados.length; i++)
{
if(grupos.indexOf(dados[i].grupo) < 0 )
{
grupos.push(dados[i].grupo);
}
}
for(var m=0; m<grupos.length; m++){
for(var j =0; j <dados.length; j++){
if(dados[j].grupo == grupos[m]){
congruentes = 0;
incongruentes = 0;
for( var i = 0; i < dados[0].ordemBateria.length; i++){
if(dados[0].ordemBateria[i] == "C"){
graficoGlobalC.push(dados[j].stringResposta[congruentes+incongruentes]);
congruentes++;
}
if(dados[0].ordemBateria[i] == "I"){
graficoGlobalI.push(dados[j].stringResposta[congruentes+incongruentes]);
incongruentes++;
}
}
}
}
if(congruentes)
plotaGraficoMedia(graficoGlobalC, congruentes,"Media Congruente do grupo "+(grupos[m]), "graficoCMedia");
if(incongruentes)
plotaGraficoMedia(graficoGlobalI, incongruentes,"Media Incongruente do grupo "+(grupos[m]), "graficoIMedia");
congruentes = 0;
incongruentes = 0;
graficoGlobalC=[];
graficoGlobalI=[];
}
for( var i = 0; i< dados[0].ordemBateria.length; i++){
if(dados[0].ordemBateria[i] == "C"){
plotaGraficoX(congruentes+incongruentes,"Congruente "+(congruentes+1), "graficoC");
congruentes++;
}
if(dados[0].ordemBateria[i] == "I"){
plotaGraficoX(congruentes+incongruentes,"Incongruente "+(incongruentes+1), "graficoI");
incongruentes++;
}
}
}
/*
Puxa somente o tempo das respostas de um vetor de respostas (um unico teste)
Foi criado pois o tempo é um dos campos de cada resposta
Retorna um array
*/
function buscaTempoResposta(vetorResposta){
var retorno = [];
for(var i = 0; i < vetorResposta.length; i++){
retorno[retorno.length] = vetorResposta[i].tempo;
}
return retorno;
}
//Chamado ao clicar no botao da aba de gerenciar
function gerenciarTestes(){
paginaAtual = "gerenciar";
buscaTestes();
loadPage();
}
//Chamado ao clicar no botao do inicio
function inicioTestes(){
paginaAtual = "main";
buscaTestes();
}
function save_data(){
if(dataSet == null){
alert("Erro");
return;
}
var tempos = []
for (var teste in dataSet){
tempos.push(buscaTempoResposta(dataSet[teste].stringResposta[0]));
}
var data = tempos;
var csvContent = "data:text/csv;charset=utf-8,";
var stroopFileContent = {};
var configs = getConfiguracoes();
for(var c in configs){
stroopFileContent[c] = configs[c];
}
stroopFileContent.dataSet = dataSet;
csvContent += JSON.stringify(stroopFileContent);
//window.open(encodedUri,"name");
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.stroop");
document.body.appendChild(link);
link.click();
}
function getFile(){
document.getElementById("upfile").click();
}
function load_data(inputFiles){
f = inputFiles[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
var data = e.target.result;
var stroopFileContent = JSON.parse(data);
dataSet = stroopFileContent.dataSet;
var configs = getConfiguracoes();
for(var c in configs){
configs[c] = stroopFileContent[c];
}
__saveConfigs();
salvaTestes();
location.reload();
}
})(f);
reader.readAsBinaryString(f);
}