Skip to content

Commit f69d458

Browse files
committed
refactored display-time survey code
1 parent 16c7a88 commit f69d458

5 files changed

Lines changed: 69 additions & 112 deletions

File tree

‎v3/composingprograms.html‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,7 @@
127127

128128
<td valign="top" style="padding-left: 20px;">
129129
<div id="togetherjsStatus"></div>
130-
131-
<!-- copied from visualize.html -->
132-
<div id="surveyHeader" style="display: none;">
133-
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666; margin-bottom: 5pt;">
134-
Support our research and help future learners by describing what you are learning.
135-
</div>
136-
<div style="font-size: 10pt; margin-bottom: 5pt; padding: 1pt;">
137-
What did you just learn?
138-
<input style="font-size: 10pt; padding: 1pt;" type="text" id="iJustLearnedInput" size="60" maxlength=300/>
139-
140-
<button id="iJustLearnedSubmission" type="button" style="font-size: 10pt;">Submit</button>
141-
142-
<span id="iJustLearnedThanks"
143-
style="color: #e93f34; font-weight: bold; font-size: 11pt; display: none;">
144-
Thanks!
145-
</span>
146-
</div>
147-
</div>
148-
130+
<div id="surveyHeader" style="display: none;"></div>
149131
</td>
150132
</tr>
151133
</table>

‎v3/csc108h.html‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,7 @@
8484

8585
<td valign="top" style="padding-left: 20px;">
8686
<div id="togetherjsStatus"></div>
87-
88-
<!-- copied from visualize.html -->
89-
<div id="surveyHeader" style="display: none;">
90-
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666; margin-bottom: 5pt;">
91-
Support our research and help future learners by describing what you are learning.
92-
</div>
93-
<div style="font-size: 10pt; margin-bottom: 5pt; padding: 1pt;">
94-
What did you just learn?
95-
<input style="font-size: 10pt; padding: 1pt;" type="text" id="iJustLearnedInput" size="60" maxlength=300/>
96-
97-
<button id="iJustLearnedSubmission" type="button" style="font-size: 10pt;">Submit</button>
98-
99-
<span id="iJustLearnedThanks"
100-
style="color: #e93f34; font-weight: bold; font-size: 11pt; display: none;">
101-
Thanks!
102-
</span>
103-
</div>
104-
</div>
105-
87+
<div id="surveyHeader" style="display: none;"></div>
10688
</td>
10789
</tr>
10890
</table>

‎v3/csc108h_shared.html‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -105,25 +105,7 @@
105105

106106
<td valign="top" style="padding-left: 20px;">
107107
<div id="togetherjsStatus"></div>
108-
109-
<!-- copied from visualize.html -->
110-
<div id="surveyHeader" style="display: none;">
111-
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666; margin-bottom: 5pt;">
112-
Support our research and help future learners by describing what you are learning.
113-
</div>
114-
<div style="font-size: 10pt; margin-bottom: 5pt; padding: 1pt;">
115-
What did you just learn?
116-
<input style="font-size: 10pt; padding: 1pt;" type="text" id="iJustLearnedInput" size="60" maxlength=300/>
117-
118-
<button id="iJustLearnedSubmission" type="button" style="font-size: 10pt;">Submit</button>
119-
120-
<span id="iJustLearnedThanks"
121-
style="color: #e93f34; font-weight: bold; font-size: 11pt; display: none;">
122-
Thanks!
123-
</span>
124-
</div>
125-
</div>
126-
108+
<div id="surveyHeader" style="display: none;"></div>
127109
</td>
128110
</tr>
129111
</table>

‎v3/js/opt-frontend-common.js‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,3 +1343,68 @@ What did you just learn? <input type="text" id="sharedSessionWhatLearned" class=
13431343
<button id="submitSessionSurveyBtn" type="button" style="font-size: 8pt;">Submit</button>\n\
13441344
<span id="sharedSessionWhatLearnedThanks" style="color: #e93f34; font-weight: bold; font-size: 10pt; display: none;">Thanks!</span>\n\
13451345
</div>'
1346+
1347+
1348+
/* display-mode survey, which is shown when the user is in 'display' mode
1349+
1350+
Version 1 -- deployed on 2014-04-09 and revoked on 2014-05-02
1351+
1352+
As of 2014-05-03, remove the button click survey questions from the
1353+
visualizer so as not to clutter up the screen. i started running this
1354+
experiment on 2014-04-09 and put it on hold on 2014-05-02:
1355+
1356+
<div id="surveyHeader" style="margin-bottom: 5pt; display: none;">
1357+
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666;">
1358+
Support our research by clicking a button when you see something interesting in the visualization.<br/>
1359+
</div>
1360+
<div>
1361+
<button class="surveyBtn" type="button">Eureka! Now I understand.</button>
1362+
<button class="surveyBtn" type="button">I learned something new!</button>
1363+
<button class="surveyBtn" type="button">I found the bug in my code!</button>
1364+
<button class="surveyBtn" type="button">This looks confusing.</button>
1365+
<button class="surveyBtn" type="button">I have another comment.</button>
1366+
</div>
1367+
</div>
1368+
1369+
[when any button is clicked a pop-up modal prompt tells the user to type
1370+
in some details elaborating on what they just clicked]
1371+
1372+
1373+
Version 2 of my display-mode survey, greatly simplified and deployed on
1374+
2014-05-24, revoked on 2014-07-13
1375+
1376+
<div id="surveyHeader" style="display: none;">
1377+
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666; margin-bottom: 5pt;">
1378+
<!-- 2014-06-04 tagline -->
1379+
Support our research and help future learners by describing what you are learning.
1380+
1381+
<!-- 2014-05-28 tagline
1382+
Help future learners by describing what you just learned.
1383+
-->
1384+
1385+
<!-- 2014-05-25 tagline
1386+
Help future learners by writing about what you are learning.
1387+
Submit as often as you like!
1388+
-->
1389+
1390+
<!-- 2014-05-24 original tagline
1391+
Help future learners by filling in this blank whenever you learn
1392+
something new from the visualization:
1393+
-->
1394+
</div>
1395+
<div style="font-size: 10pt; margin-bottom: 5pt; padding: 1pt;">
1396+
<!-- this phrasing retired on 2014-06-04: "I just learned that" -->
1397+
What did you just learn?
1398+
<input style="font-size: 10pt; padding: 1pt;" type="text" id="iJustLearnedInput" size="60" maxlength=300/>
1399+
1400+
<button id="iJustLearnedSubmission" type="button" style="font-size: 10pt;">Submit</button>
1401+
1402+
<span id="iJustLearnedThanks"
1403+
style="color: #e93f34; font-weight: bold; font-size: 11pt; display: none;">
1404+
Thanks!
1405+
</span>
1406+
</div>
1407+
</div>
1408+
1409+
*/
1410+

‎v3/visualize.html‎

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,6 @@
7878

7979
<body>
8080

81-
<!--
82-
// as of 2014-05-03, remove the button click survey questions from the
83-
// visualizer so as not to clutter up the screen. i started running
84-
// this experiment on 2014-04-09 and put it on hold on 2014-05-02:
85-
86-
<div id="surveyHeader" style="margin-bottom: 5pt; display: none;">
87-
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666;">
88-
Support our research by clicking a button when you see something interesting in the visualization.<br/>
89-
</div>
90-
<div>
91-
<button class="surveyBtn" type="button">Eureka! Now I understand.</button>
92-
<button class="surveyBtn" type="button">I learned something new!</button>
93-
<button class="surveyBtn" type="button">I found the bug in my code!</button>
94-
<button class="surveyBtn" type="button">This looks confusing.</button>
95-
<button class="surveyBtn" type="button">I have another comment.</button>
96-
</div>
97-
</div>
98-
99-
-->
100-
10181
<table id="experimentalHeader">
10282
<tr>
10383
<td valign="top">
@@ -133,41 +113,7 @@
133113

134114
<div id="togetherjsStatus"></div>
135115

136-
<!--
137-
// Version 2 of my display-mode survey, greatly simplified and deployed on 2014-05-24
138-
-->
139-
<div id="surveyHeader" style="display: none;">
140-
<div id="vizSurveyLabel" style="font-size: 8pt; color: #666; margin-bottom: 5pt;">
141-
<!-- 2014-06-04 tagline -->
142-
Support our research and help future learners by describing what you are learning.
143-
144-
<!-- 2014-05-28 tagline
145-
Help future learners by describing what you just learned.
146-
-->
147-
148-
<!-- 2014-05-25 tagline
149-
Help future learners by writing about what you are learning.
150-
Submit as often as you like!
151-
-->
152-
153-
<!-- 2014-05-24 original tagline
154-
Help future learners by filling in this blank whenever you learn
155-
something new from the visualization:
156-
-->
157-
</div>
158-
<div style="font-size: 10pt; margin-bottom: 5pt; padding: 1pt;">
159-
<!-- this phrasing retired on 2014-06-04: "I just learned that" -->
160-
What did you just learn?
161-
<input style="font-size: 10pt; padding: 1pt;" type="text" id="iJustLearnedInput" size="60" maxlength=300/>
162-
163-
<button id="iJustLearnedSubmission" type="button" style="font-size: 10pt;">Submit</button>
164-
165-
<span id="iJustLearnedThanks"
166-
style="color: #e93f34; font-weight: bold; font-size: 11pt; display: none;">
167-
Thanks!
168-
</span>
169-
</div>
170-
</div>
116+
<div id="surveyHeader" style="display: none;"></div>
171117

172118
</td>
173119
</tr>

0 commit comments

Comments
 (0)