diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/manage.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_question.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 6 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_modules.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/error_template.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 19 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 37 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 18 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 21 |
10 files changed, 102 insertions, 9 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 17ce23e..c1f9da3 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -18,7 +18,7 @@ <li><a href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li> <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> <li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/grader"> Grader </a></li> + <li><a href="{{ url_root }}/exam/manage/grader"> Regrade </a></li> <li><a href="{{ URL_ROOT }}/exam/reset/changepassword">Change Password</a></li> <li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li> <li><a href="{{URL_ROOT}}/exam/logout/" id="logout">Logout</a></li> diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index ed69657..79c132c 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -64,6 +64,7 @@ <option value="integertestcase">Integer </option> <option value="stringtestcase"> String </option> <option value="floattestcase"> Float </option> + <option value="arrangetestcase">Arrange options </option> </select></p> <center> <button class="btn" type="submit" name="save_question">Save</button> diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index a5d10a7..9fcae68 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -136,12 +136,14 @@ <th>Sr No.</th> <th>Students</th> <th>Total</th> + <th>Grade</th> <th colspan="{{modules|length}}">Modules</th> </tr> <tr> <th scope="row"></th> <th></th> <th></th> + <th></th> {% if modules %} {% for module in modules %} <th> @@ -171,6 +173,10 @@ {% course_completion_percent course student as c_percent %} {{c_percent}} % </td> + <td> + {% course_grade course student as grade %} + {{grade}} + </td> {% if modules %} {% for module in modules %} <td> diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index afbae75..6c93e97 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -17,6 +17,7 @@ <center>{{ msg }}</center> </div> {% endif %} +<b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b> {% if learning_modules %} <table class="table"> {% for module in learning_modules %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index dabf8eb..ba09c6d 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -56,6 +56,10 @@ <a href="{{URL_ROOT}}/exam/manage/courses/all_learning_module"> Add/View Modules</a> </li> + <li> + <a href="{% url 'grades:grading_systems'%}"> + Add/View Grading Systems </a> + </li> </ul> </div> </div> diff --git a/yaksh/templates/yaksh/error_template.html b/yaksh/templates/yaksh/error_template.html index 61657ae..301020e 100644 --- a/yaksh/templates/yaksh/error_template.html +++ b/yaksh/templates/yaksh/error_template.html @@ -3,7 +3,6 @@ {% endblock %} {% load custom_filters %} - {% if error_message %} {% for error in error_message %} @@ -35,6 +34,7 @@ </tr> <tr> {% if error.traceback %} + <input type="hidden" id="err_lineno" value="{{error.line_no}}"> <td><b>Full Traceback: </b></td> <td><pre>{{error.traceback}}</pre></td> {% endif %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 93f00e0..8430e91 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -167,7 +167,7 @@ Status : <b style="color: red;"> Failed </b><br/> {% endif %} {% endfor %} - {% elif question.type == "integer" or "string" or "float" %} + {% elif question.type == "integer" or question.type == "string" or question.type == "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} <strong>{{ testcase.correct|safe }}</strong> @@ -175,6 +175,14 @@ Status : <b style="color: red;"> Failed </b><br/> <strong>{{ testcase.error_margin|safe }}</strong> {% endif %} {% endfor %} + {% elif question.type == "arrange" %} + <h5> <u>Correct Order:</u></h5> + <div class="list-group" > + {% for testcase in question.get_test_cases %} + <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li> + {% endfor %} + </div> + {% else %} <h5> <u>Test cases: </u></h5> {% for testcase in question.get_test_cases %} @@ -307,6 +315,15 @@ Status : <b style="color: red;"> Failed </b><br/> {% endif %} {% endfor %} </div> + + {% elif question.type == "arrange"%} + <div class="well well-sm"> + {% get_answer_for_arrange_options ans.answer.answer question as tc_list %} + {% for testcases in tc_list %} + <li>{{ testcases.options.strip|safe }}</li> + {% endfor %} + </div> + {% else %} <div class="well well-sm"> {{ ans.answer.answer.strip|safe }} diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 9d6ce48..ebfe066 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -11,6 +11,10 @@ .CodeMirror{ border-style: groove; } + .activeline { + background: #FBC2C4 !important; + color: #8a1f11 !important; + } </style> {% endblock %} @@ -21,6 +25,7 @@ <script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/clike/clike.js"></script> <script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/shell/shell.js"></script> <script src="{{ URL_ROOT }}/static/yaksh/js/mathjax/MathJax.js?config=TeX-MML-AM_CHTML"></script> +<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-sortable.js"></script> <script> init_val = '{{ last_attempt|escape_quotes|safe }}'; lang = "{{ question.language }}" @@ -175,10 +180,12 @@ question_type = "{{ question.type }}" {% else %} <h5>(CASE SENSITIVE)</h5> {% endif %} - {% elif question.type == "float" %} (FILL IN THE BLANKS WITH FLOAT ANSWER) + {% elif question.type == "arrange" %} + (ARRANGE THE OPTIONS IN CORRECT ORDER) {% endif %} + </u> <font class=pull-right>(Marks : {{ question.points }}) </font> </h4> @@ -218,7 +225,7 @@ question_type = "{{ question.type }}" {% if question.type == "integer" %} Enter Integer:<br/> - <input autofocus name="answer" type="number" id="integer" value={{ last_attempt|safe }} /> + <input autofocus name="answer" type="number" id="integer" value="{{ last_attempt|safe }}" /> <br/><br/> {% endif %} @@ -230,7 +237,7 @@ question_type = "{{ question.type }}" {% if question.type == "float" %} Enter Decimal Value :<br/> - <input autofocus name="answer" type="number" step="any" id="float" value={{ last_attempt|safe }} /> + <input autofocus name="answer" type="number" step="any" id="float" value="{{ last_attempt|safe }}" /> <br/><br/> {% endif %} @@ -251,6 +258,27 @@ question_type = "{{ question.type }}" <input type=file id="assignment" name="assignment" multiple=""> <hr> {% endif %} + + {% if question.type == "arrange" %} + {% if last_attempt %} + {% get_answer_for_arrange_options last_attempt question as test_cases %} + {% endif %} + <input name="answer" type="hidden" id='arrange_order'/> + <div class="list-group"> + <ol class="arrange"> + {% for test_case in test_cases %} + <li class="list-group-item" id={{test_case.id}}>{{test_case.options| safe }}</li> + {% endfor %} + </ol> + </div> + + <script type="text/javascript"> + var arrange = $("ol.arrange"); + var order_array = $(arrange).sortable(['serialize']); + </script> + {% endif %} + + {% if question.type == "code" %} <div class="row"> <div class="col-md-9"> @@ -269,6 +297,9 @@ question_type = "{{ question.type }}" <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> + {% elif question.type == "arrange" %} + <br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return user_arranged_options();">Submit Answer</button> + {% else %} {% if question in paper.get_questions_unanswered or quiz.is_exercise %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index ce2533e..9449fcc 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -80,6 +80,13 @@ User IP address: {{ paper.user_ip }} <strong>{{ testcase.correct|safe }}</strong> {% endfor %} + {% elif question.type == "arrange" %} + <h5> <u>Correct Order:</u></h5> + <div class="list-group" > + {% for testcase in question.get_test_cases %} + <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li> + {% endfor %} + </div> {% else %} <h5> <u>Test cases: </u></h5> @@ -99,6 +106,7 @@ User IP address: {{ paper.user_ip }} {% endif %} <div class="panel-body"> <h5><u>Student answer:</u></h5> + {% if question.type == "mcc"%} <div class="well well-sm"> {% for testcases in question.get_test_cases %} @@ -107,6 +115,7 @@ User IP address: {{ paper.user_ip }} {% endif %} {% endfor %} </div> + {% elif question.type == "mcq"%} <div class="well well-sm"> {% for testcases in question.get_test_cases %} @@ -115,6 +124,15 @@ User IP address: {{ paper.user_ip }} {% endif %} {% endfor %} </div> + + {% elif question.type == "arrange"%} + <div class="well well-sm"> + {% get_answer_for_arrange_options answers.0.answer question as tc_list %} + {% for testcases in tc_list %} + <li>{{ testcases.options.strip|safe }}</li> + {% endfor %} + </div> + {%else%} <div class="well well-sm"> {{ answers.0.answer|safe }} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 971ef77..7cbec91 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -35,9 +35,9 @@ End time : {{ paper.end_time }} <br/> Percentage obtained: {{ paper.percent }}% <br/> {% if paper.passed %} - Status : <b style="color: red;"> Failed </b><br/> - {% else %} Status : <b style="color: green;"> Passed </b><br/> + {% else %} + Status : <b style="color: red;"> Failed </b><br/> {% endif %} </p> @@ -67,12 +67,20 @@ {% endif %} {% endfor %} - {% elif question.type == "integer" or "string" or "float" %} + {% elif question.type == "integer" or question.type == "string" or question.type == "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} <strong>{{ testcase.correct|safe }}</strong> {% endfor %} + {% elif question.type == "arrange" %} + <h5> <u>Correct Order:</u></h5> + <div class="list-group"> + {% for testcase in question.get_test_cases %} + <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li> + {% endfor %} + </div> + {% else %} <h5> <u>Test cases: </u></h5> {% for testcase in question.get_test_cases %} @@ -108,6 +116,13 @@ {% endif %} {% endfor %} </div> + {% elif question.type == "arrange"%} + <div class="well well-sm"> + {% get_answer_for_arrange_options answers.0.answer question as tc_list %} + {% for testcases in tc_list %} + <li>{{ testcases.options.strip|safe }}</li> + {% endfor %} + </div> {% elif question.type == "upload" and has_user_assignment %} <a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}"> <div class="well well-sm"> |