Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 83db38d

Browse files
committed
Peer Updates
* Make textareas larger to encourage more explanation * Fix an async crasher when there is a one-sided conversation
1 parent 068c507 commit 83db38d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

controllers/peer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def dashboard():
7070
next = "Reset"
7171
else:
7272
next = False
73-
current_question = _get_current_question(assignment_id, next)
73+
current_question, done = _get_current_question(assignment_id, next)
7474
assignment = db(db.assignments.id == assignment_id).select().first()
7575

7676
db.useinfo.insert(
@@ -105,7 +105,7 @@ def dashboard():
105105

106106
def extra():
107107
assignment_id = request.vars.assignment_id
108-
current_question = _get_current_question(assignment_id, False)
108+
current_question, done = _get_current_question(assignment_id, False)
109109

110110
return dict(
111111
course_id=auth.user.course_name,
@@ -334,7 +334,7 @@ def peer_question():
334334

335335
assignment_id = request.vars.assignment_id
336336

337-
current_question = _get_current_question(assignment_id, False)
337+
current_question, done = _get_current_question(assignment_id, False)
338338
assignment = db(db.assignments.id == assignment_id).select().first()
339339

340340
return dict(
@@ -550,7 +550,9 @@ def get_async_explainer():
550550
else:
551551
tries += 1
552552
mess, participants = _get_user_messages(user, div_id, course_name)
553-
participants.remove(user)
553+
# This is the easy solution, but may result in a one-sided conversation.
554+
if user in participants:
555+
participants.remove(user)
554556
else:
555557
messages = db(
556558
(db.useinfo.event == "sendmessage")

views/peer/peer_async.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3>Congratulations, you have completed this assignment!</h3>
3434
Please provide an explanation for why you answered
3535
<span id="current_answer">__</span>
3636
</p>
37-
<textarea id="messageText" rows="2" cols="40"> </textarea> <br />
37+
<textarea id="messageText" rows="6" cols="80"> </textarea> <br />
3838
<button type="button" onclick="showPeerEnableVote2()">Submit</button>
3939
<div>
4040
<h4>A discussion for you to consider</h4>

views/peer/peer_question.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2>Peer Instruction: {{=assignment_name}}</h2>
2929
<div id="peerlist">
3030
</div>
3131
<p>Please discuss the answers with your group members</p>
32-
<textarea id="messageText" rows="2" cols="40">
32+
<textarea id="messageText" rows="6" cols="40">
3333
</textarea>
3434
<button id="sendpeermsg" type="button" onclick="sendMessage()">Send</button>
3535
<div>

0 commit comments

Comments
 (0)