More Bug Fixes
This commit is contained in:
		@@ -63,99 +63,105 @@
 | 
				
			|||||||
                            Incomplete
 | 
					                            Incomplete
 | 
				
			||||||
                        {% endif %}
 | 
					                        {% endif %}
 | 
				
			||||||
                    </li>
 | 
					                    </li>
 | 
				
			||||||
                    <li class="list-group-item list-group-item-action">
 | 
					                    {% if results in entry %}
 | 
				
			||||||
                        <div class="d-flex w-100 justify-content-between">
 | 
					                        <li class="list-group-item list-group-item-action">
 | 
				
			||||||
                            <h5 class="mb-1">Score</h5>
 | 
					                            <div class="d-flex w-100 justify-content-between">
 | 
				
			||||||
                        </div>
 | 
					                                <h5 class="mb-1">Score</h5>
 | 
				
			||||||
                        {{ entry.results.score }}%
 | 
					                            </div>
 | 
				
			||||||
                    </li>
 | 
					                            {{ entry.results.score }}%
 | 
				
			||||||
                    <li class="list-group-item list-group-item-action {% if entry.results.grade == 'fail' %}list-group-item-danger {% elif entry.results.grade == 'merit' %} list-group-item-success {% endif %}">
 | 
					                        </li>
 | 
				
			||||||
                        <div class="d-flex w-100 justify-content-between">
 | 
					                        <li class="list-group-item list-group-item-action {% if entry.results.grade == 'fail' %}list-group-item-danger {% elif entry.results.grade == 'merit' %} list-group-item-success {% endif %}">
 | 
				
			||||||
                            <h5 class="mb-1">Grade</h5>
 | 
					                            <div class="d-flex w-100 justify-content-between">
 | 
				
			||||||
                        </div>
 | 
					                                <h5 class="mb-1">Grade</h5>
 | 
				
			||||||
                        {{ entry.results.grade[0]|upper }}{{ entry.results.grade[1:]}}
 | 
					                            </div>
 | 
				
			||||||
                    </li>
 | 
					                            {{ entry.results.grade[0]|upper }}{{ entry.results.grade[1:]}}
 | 
				
			||||||
 | 
					                        </li>
 | 
				
			||||||
 | 
					                    {% else %}
 | 
				
			||||||
 | 
					                        No results to display.
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
                </ul>
 | 
					                </ul>
 | 
				
			||||||
                <div class="accordion" id="results-breakdown">
 | 
					                {% if not results in entry %}
 | 
				
			||||||
                    <div class="accordion-item">
 | 
					                    <div class="accordion" id="results-breakdown">
 | 
				
			||||||
                        <h2 class="accordion-header" id="by-category">
 | 
					                        <div class="accordion-item">
 | 
				
			||||||
                            <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#by-category-breakdown" aria-expanded="false" aria-controls="by-category-breakdown">
 | 
					                            <h2 class="accordion-header" id="by-category">
 | 
				
			||||||
                                Score By Categories
 | 
					                                <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#by-category-breakdown" aria-expanded="false" aria-controls="by-category-breakdown">
 | 
				
			||||||
                            </button>
 | 
					                                    Score By Categories
 | 
				
			||||||
                        </h2>
 | 
					                                </button>
 | 
				
			||||||
                        <div id="by-category-breakdown" class="accordion-collapse collapse" aria-labelledby="by-category" data-bs-parent="#results-breakdown">
 | 
					                            </h2>
 | 
				
			||||||
 | 
					                            <div id="by-category-breakdown" class="accordion-collapse collapse" aria-labelledby="by-category" data-bs-parent="#results-breakdown">
 | 
				
			||||||
 | 
					                                <div class="accordion-body">
 | 
				
			||||||
 | 
					                                    <table class="table table-striped">
 | 
				
			||||||
 | 
					                                        <thead>
 | 
				
			||||||
 | 
					                                            <tr>
 | 
				
			||||||
 | 
					                                                <th>
 | 
				
			||||||
 | 
					                                                    Category
 | 
				
			||||||
 | 
					                                                </th>
 | 
				
			||||||
 | 
					                                                <th>
 | 
				
			||||||
 | 
					                                                    Score
 | 
				
			||||||
 | 
					                                                </th>
 | 
				
			||||||
 | 
					                                                <th>
 | 
				
			||||||
 | 
					                                                    Max
 | 
				
			||||||
 | 
					                                                </th>
 | 
				
			||||||
 | 
					                                            </tr>
 | 
				
			||||||
 | 
					                                        </thead>
 | 
				
			||||||
 | 
					                                        <tbody>
 | 
				
			||||||
 | 
					                                            {% for tag, scores in entry.results.tags.items() %}
 | 
				
			||||||
 | 
					                                                <tr>
 | 
				
			||||||
 | 
					                                                    <td>
 | 
				
			||||||
 | 
					                                                        {{ tag }}
 | 
				
			||||||
 | 
					                                                    </td>
 | 
				
			||||||
 | 
					                                                    <td>
 | 
				
			||||||
 | 
					                                                        {{ scores.scored }}
 | 
				
			||||||
 | 
					                                                    </td>
 | 
				
			||||||
 | 
					                                                    <td>
 | 
				
			||||||
 | 
					                                                        {{scores.max}}
 | 
				
			||||||
 | 
					                                                    </td>
 | 
				
			||||||
 | 
					                                                </tr>
 | 
				
			||||||
 | 
					                                            {% endfor %}
 | 
				
			||||||
 | 
					                                        </tbody>
 | 
				
			||||||
 | 
					                                    </table>
 | 
				
			||||||
 | 
					                                </div>
 | 
				
			||||||
 | 
					                            </div>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                        <div class="accordion-item">
 | 
				
			||||||
 | 
					                            <h2 class="accordion-header" id="by-question">
 | 
				
			||||||
 | 
					                                <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#by-question-breakdown" aria-expanded="false" aria-controls="by-question-breakdown">
 | 
				
			||||||
 | 
					                                    View All Answers
 | 
				
			||||||
 | 
					                                </button>
 | 
				
			||||||
 | 
					                            </h2>
 | 
				
			||||||
 | 
					                        <div id="by-question-breakdown" class="accordion-collapse collapse" aria-labelledby="by-question" data-bs-parent="#results-breakdown">
 | 
				
			||||||
                            <div class="accordion-body">
 | 
					                            <div class="accordion-body">
 | 
				
			||||||
                                <table class="table table-striped">
 | 
					                                <table class="table table-striped">
 | 
				
			||||||
                                    <thead>
 | 
					                                        <thead>
 | 
				
			||||||
                                        <tr>
 | 
					 | 
				
			||||||
                                            <th>
 | 
					 | 
				
			||||||
                                                Category
 | 
					 | 
				
			||||||
                                            </th>
 | 
					 | 
				
			||||||
                                            <th>
 | 
					 | 
				
			||||||
                                                Score
 | 
					 | 
				
			||||||
                                            </th>
 | 
					 | 
				
			||||||
                                            <th>
 | 
					 | 
				
			||||||
                                                Max
 | 
					 | 
				
			||||||
                                            </th>
 | 
					 | 
				
			||||||
                                        </tr>
 | 
					 | 
				
			||||||
                                    </thead>
 | 
					 | 
				
			||||||
                                    <tbody>
 | 
					 | 
				
			||||||
                                        {% for tag, scores in entry.results.tags.items() %}
 | 
					 | 
				
			||||||
                                            <tr>
 | 
					                                            <tr>
 | 
				
			||||||
                                                <td>
 | 
					                                                <th>
 | 
				
			||||||
                                                    {{ tag }}
 | 
					                                                    Question
 | 
				
			||||||
                                                </td>
 | 
					                                                </th>
 | 
				
			||||||
                                                <td>
 | 
					                                                <th>
 | 
				
			||||||
                                                    {{ scores.scored }}
 | 
					                                                    Answer
 | 
				
			||||||
                                                </td>
 | 
					                                                </th>
 | 
				
			||||||
                                                <td>
 | 
					 | 
				
			||||||
                                                    {{scores.max}}
 | 
					 | 
				
			||||||
                                                </td>
 | 
					 | 
				
			||||||
                                            </tr>
 | 
					                                            </tr>
 | 
				
			||||||
                                        {% endfor %}
 | 
					                                        </thead>
 | 
				
			||||||
                                    </tbody>
 | 
					                                        <tbody>
 | 
				
			||||||
 | 
					                                            {% for question, answer in entry.answers.items() %}
 | 
				
			||||||
 | 
					                                                <tr>
 | 
				
			||||||
 | 
					                                                    <td>
 | 
				
			||||||
 | 
					                                                        {{ question }}
 | 
				
			||||||
 | 
					                                                    </td>
 | 
				
			||||||
 | 
					                                                    <td>
 | 
				
			||||||
 | 
					                                                        {{ answer }}
 | 
				
			||||||
 | 
					                                                        {% if not correct[question] == answer %}
 | 
				
			||||||
 | 
					                                                            <span class="badge badge-pill bg-danger badge-danger">Incorrect</span>
 | 
				
			||||||
 | 
					                                                        {% endif %}
 | 
				
			||||||
 | 
					                                                    </td>
 | 
				
			||||||
 | 
					                                                </tr>
 | 
				
			||||||
 | 
					                                            {% endfor %}
 | 
				
			||||||
 | 
					                                        </tbody>
 | 
				
			||||||
                                </table>
 | 
					                                </table>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    <div class="accordion-item">
 | 
					                {% endif %}
 | 
				
			||||||
                        <h2 class="accordion-header" id="by-question">
 | 
					 | 
				
			||||||
                            <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#by-question-breakdown" aria-expanded="false" aria-controls="by-question-breakdown">
 | 
					 | 
				
			||||||
                                View All Answers
 | 
					 | 
				
			||||||
                            </button>
 | 
					 | 
				
			||||||
                        </h2>
 | 
					 | 
				
			||||||
                    <div id="by-question-breakdown" class="accordion-collapse collapse" aria-labelledby="by-question" data-bs-parent="#results-breakdown">
 | 
					 | 
				
			||||||
                        <div class="accordion-body">
 | 
					 | 
				
			||||||
                            <table class="table table-striped">
 | 
					 | 
				
			||||||
                                    <thead>
 | 
					 | 
				
			||||||
                                        <tr>
 | 
					 | 
				
			||||||
                                            <th>
 | 
					 | 
				
			||||||
                                                Question
 | 
					 | 
				
			||||||
                                            </th>
 | 
					 | 
				
			||||||
                                            <th>
 | 
					 | 
				
			||||||
                                                Answer
 | 
					 | 
				
			||||||
                                            </th>
 | 
					 | 
				
			||||||
                                        </tr>
 | 
					 | 
				
			||||||
                                    </thead>
 | 
					 | 
				
			||||||
                                    <tbody>
 | 
					 | 
				
			||||||
                                        {% for question, answer in entry.answers.items() %}
 | 
					 | 
				
			||||||
                                            <tr>
 | 
					 | 
				
			||||||
                                                <td>
 | 
					 | 
				
			||||||
                                                    {{ question }}
 | 
					 | 
				
			||||||
                                                </td>
 | 
					 | 
				
			||||||
                                                <td>
 | 
					 | 
				
			||||||
                                                    {{ answer }}
 | 
					 | 
				
			||||||
                                                    {% if not correct[question] == answer %}
 | 
					 | 
				
			||||||
                                                        <span class="badge badge-pill bg-danger badge-danger">Incorrect</span>
 | 
					 | 
				
			||||||
                                                    {% endif %}
 | 
					 | 
				
			||||||
                                                </td>
 | 
					 | 
				
			||||||
                                            </tr>
 | 
					 | 
				
			||||||
                                        {% endfor %}
 | 
					 | 
				
			||||||
                                    </tbody>
 | 
					 | 
				
			||||||
                            </table>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
                <div class="container justify-content-center">
 | 
					                <div class="container justify-content-center">
 | 
				
			||||||
                    <div class="row">
 | 
					                    <div class="row">
 | 
				
			||||||
                        <a href="#" class="btn btn-primary result-action-buttons" data-result-action="generate" data-_id="{{ entry._id }}">
 | 
					                        <a href="#" class="btn btn-primary result-action-buttons" data-result-action="generate" data-_id="{{ entry._id }}">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user