Commit f47339cd3d65e4f72df25cfcb39dddc223864b0e
1 parent
ae59481e
Exists in
master
and in
1 other branch
removes the lines option from textarea.
Showing
3 changed files
with
2 additions
and
4 deletions
Show diff stats
aprendizations/questions.py
@@ -318,7 +318,6 @@ class QuestionTextArea(Question): | @@ -318,7 +318,6 @@ class QuestionTextArea(Question): | ||
318 | text (str) | 318 | text (str) |
319 | correct (str with script to run) | 319 | correct (str with script to run) |
320 | answer (None or an actual answer) | 320 | answer (None or an actual answer) |
321 | - lines (int) | ||
322 | ''' | 321 | ''' |
323 | 322 | ||
324 | # ------------------------------------------------------------------------ | 323 | # ------------------------------------------------------------------------ |
@@ -327,7 +326,6 @@ class QuestionTextArea(Question): | @@ -327,7 +326,6 @@ class QuestionTextArea(Question): | ||
327 | 326 | ||
328 | self.set_defaults(QDict({ | 327 | self.set_defaults(QDict({ |
329 | 'text': '', | 328 | 'text': '', |
330 | - 'lines': 8, # FIXME unused? | ||
331 | 'timeout': 5, # seconds | 329 | 'timeout': 5, # seconds |
332 | 'correct': '', # trying to execute this will fail => grade 0.0 | 330 | 'correct': '', # trying to execute this will fail => grade 0.0 |
333 | 'args': [] | 331 | 'args': [] |
aprendizations/templates/question-textarea.html
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | 2 | ||
3 | {% block answer %} | 3 | {% block answer %} |
4 | 4 | ||
5 | -<textarea class="form-control" rows="{{ question['lines'] }}" name="answer" id="code" autofocus>{{ question['answer'] or '' }}</textarea><br /> | 5 | +<textarea class="form-control" name="answer" id="code" autofocus>{{ question['answer'] or '' }}</textarea><br /> |
6 | <input type="hidden" name="qid" value="{{ question['qid'] }}"> | 6 | <input type="hidden" name="qid" value="{{ question['qid'] }}"> |
7 | 7 | ||
8 | <script> | 8 | <script> |
demo/solar_system/correct-first_3_planets.py
@@ -23,6 +23,6 @@ out = f'''--- | @@ -23,6 +23,6 @@ out = f'''--- | ||
23 | grade: {grade} | 23 | grade: {grade} |
24 | comments: {comments}''' | 24 | comments: {comments}''' |
25 | 25 | ||
26 | -time.sleep(1) | 26 | +time.sleep(2) # simulate computation time (may generate timeout) |
27 | 27 | ||
28 | print(out) | 28 | print(out) |