Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
T
textBoxDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rebecca
textBoxDemo
Commits
c3b3c067
Commit
c3b3c067
authored
Oct 20, 2020
by
Rebecca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JS fix
parent
d041d0d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
textBoxDemo-legacy-browsers.js
textBoxDemo-legacy-browsers.js
+2
-1
textBoxDemo.js
textBoxDemo.js
+2
-1
textBoxDemo.psyexp
textBoxDemo.psyexp
+1
-1
No files found.
textBoxDemo-legacy-browsers.js
View file @
c3b3c067
...
...
@@ -345,12 +345,13 @@ function feedbackRoutineBegin(snapshot) {
frameN
=
-
1
;
routineTimer
.
add
(
1.000000
);
// update component parameters for each repeat
if
((
textbox
.
_text
===
corrAns
))
{
if
((
textbox
.
_
pixi
.
text
===
corrAns
))
{
thisFeedback
=
"Correct!"
;
}
else
{
thisFeedback
=
"Incorrect"
;
}
trials
.
addData
(
"correctAns"
,
thisFeedback
);
psychoJS
.
experiment
.
addData
(
'textbox.text'
,
textbox
.
_pixi
.
text
);
feedbackText
.
setText
(
thisFeedback
);
// keep track of which components have finished
...
...
textBoxDemo.js
View file @
c3b3c067
...
...
@@ -353,12 +353,13 @@ function feedbackRoutineBegin(snapshot) {
frameN
=
-
1
;
routineTimer
.
add
(
1.000000
);
// update component parameters for each repeat
if
((
textbox
.
_text
===
corrAns
))
{
if
((
textbox
.
_
pixi
.
text
===
corrAns
))
{
thisFeedback
=
"Correct!"
;
}
else
{
thisFeedback
=
"Incorrect"
;
}
trials
.
addData
(
"correctAns"
,
thisFeedback
);
psychoJS
.
experiment
.
addData
(
'textbox.text'
,
textbox
.
_pixi
.
text
);
feedbackText
.
setText
(
thisFeedback
);
// keep track of which components have finished
...
...
textBoxDemo.psyexp
View file @
c3b3c067
...
...
@@ -118,7 +118,7 @@
<Param
name=
"Before JS Experiment"
updates=
"constant"
val=
""
valType=
"extendedCode"
/>
<Param
name=
"Begin Experiment"
updates=
"constant"
val=
""
valType=
"extendedCode"
/>
<Param
name=
"Begin JS Experiment"
updates=
"constant"
val=
""
valType=
"extendedCode"
/>
<Param
name=
"Begin JS Routine"
updates=
"constant"
val=
"if ((textbox._
text === corrAns)) {&#10; thisFeedback = "Correct!";&#10;} else {&#10; thisFeedback = "Incorrect";&#10;}&#10;trials.addData("correctAns", thisFeedback
);&#10;"
valType=
"extendedCode"
/>
<Param
name=
"Begin JS Routine"
updates=
"constant"
val=
"if ((textbox._
pixi.text === corrAns)) {&#10; thisFeedback = "Correct!";&#10;} else {&#10; thisFeedback = "Incorrect";&#10;}&#10;trials.addData("correctAns", thisFeedback);&#10;psychoJS.experiment.addData('textbox.text', textbox._pixi.text
);&#10;"
valType=
"extendedCode"
/>
<Param
name=
"Begin Routine"
updates=
"constant"
val=
"if textbox.text == corrAns:&#10; thisFeedback = 'Correct!'&#10;else:&#10; thisFeedback = 'Incorrect'&#10;&#10;trials.addData('correctAns', thisFeedback)"
valType=
"extendedCode"
/>
<Param
name=
"Code Type"
updates=
"None"
val=
"Both"
valType=
"str"
/>
<Param
name=
"Each Frame"
updates=
"constant"
val=
""
valType=
"extendedCode"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment