Skip to content

Commit d8f5582

Browse files
author
Philip Guo
committed
minor
1 parent cf9a0ee commit d8f5582

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎cgi-bin/load_question.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
form = cgi.FieldStorage()
3030
question_file = form['question_file'].value
3131

32-
fn = QUESTIONS_DIR + question_file
32+
fn = QUESTIONS_DIR + question_file + '.txt'
3333
assert os.path.isfile(fn)
3434

3535

‎edu-python-questions.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ function resetTestResults() {
4848
$(document).ready(function() {
4949
eduPythonCommonInit(); // must call this first!
5050

51-
enterEditMode();
52-
5351
$("#actualCodeInput").tabby(); // recognize TAB and SHIFT-TAB
5452
$("#testCodeInput").tabby(); // recognize TAB and SHIFT-TAB
5553

@@ -113,6 +111,14 @@ $(document).ready(function() {
113111
});
114112

115113

114+
enterEditMode();
115+
// From: http://benalman.com/projects/jquery-bbq-plugin/
116+
// Since the event is only triggered when the hash changes, we need
117+
// to trigger the event now, to handle the hash the page may have
118+
// loaded with.
119+
$(window).trigger( "hashchange" );
120+
121+
116122
// load the questions file specified by the query string
117123
var questionsFilename = location.search.substring(1);
118124

‎question.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
<div class="questionsHeaderTitle" id="ProblemName"></div>
6262

63-
<div class="questionsHeaderStmt" id="ProblemStatement">(please load a question, e.g., "?inplace-reverse.txt")</div>
63+
<div class="questionsHeaderStmt" id="ProblemStatement"><b>(Please load a question, e.g., "?inplace-reverse")</b></div>
6464

6565
<div class="questionsHeaderStmt" id="HintStatement"><a href="#" id="showHintHref">Show hint</a></div>
6666
<div class="questionsHeaderStmt" id="SolutionStatement"><a href="#" id="showSolutionHref">Show solution</a></div>

0 commit comments

Comments
 (0)