diff options
-rw-r--r-- | yaksh/db.cnf | 5 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 8 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/yaksh/db.cnf b/yaksh/db.cnf deleted file mode 100644 index 22c68e3..0000000 --- a/yaksh/db.cnf +++ /dev/null @@ -1,5 +0,0 @@ -# new.cnf -[client] -database = online_test -user = root -default-character-set = utf8 diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 7801b0b..8653dc7 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -140,10 +140,10 @@ Status : <b style="color: green;"> Passed </b><br/> {% endif %} {% endfor %} - {% elif question.type == "integer" %} + {% elif question.type == "integer" or "string" or "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} - <strong>{{ testcase.correct }}</strong> + <strong>{{ testcase.correct|safe }}</strong> {% endfor %} {% else %} diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 930c57d..bfc90a8 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -153,6 +153,12 @@ function call_skip(url) (ANSWER IN INTEGER) {% elif question.type == "string" %} (ANSWER IN STRING) + {% if testcase.string_check == "lower" %} + <h5>(CASE INSENSITIVE)</h5> + {% else %} + <h5>(CASE SENSITIVE)</h5> + {% endif %} + {% elif question.type == "float" %} (ANSWER IN FLOAT) {% endif %} @@ -217,7 +223,7 @@ function call_skip(url) {% endif %} <div class="from-group"> - {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" %} + {% if question.type == "mcq" or "mcc" or "integer" or "float" or "string" %} <br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button> {% elif question.type == "upload" %} <br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button> diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index b667676..832e343 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -76,10 +76,10 @@ User IP address: {{ paper.user_ip }} {% endif %} {% endfor %} - {% elif question.type == "integer" %} + {{% elif question.type == "integer" or "string" or "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} - <strong>{{ testcase.correct }}</strong> + <strong>{{ testcase.correct|safe }}</strong> {% endfor %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 76369db..633be9e 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -52,10 +52,10 @@ {% endif %} {% endfor %} - {% elif question.type == "integer" %} + {% elif question.type == "integer" or "string" or "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} - <strong>{{ testcase.correct }}</strong> + <strong>{{ testcase.correct|safe }}</strong> {% endfor %} {% else %} |