forked from apluslms/a-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Personalized points goal improvements
- Loading branch information
1 parent
5ffda9a
commit 18ebc09
Showing
8 changed files
with
133 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.progress .goal-points { | ||
position: absolute; | ||
height: 20px; | ||
border-left: 1px solid blue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
{% load i18n %} | ||
{% load static %} | ||
{% if not feedback_revealed %} | ||
<p class="small"> | ||
<i class="glyphicon glyphicon-info-sign"></i> | ||
{% translate "RESULTS_OF_SOME_ASSIGNMENTS_ARE_CURRENTLY_HIDDEN" %} | ||
</p> | ||
{% endif %} | ||
Personalized {{personalized_points_goal}} | ||
|
||
<div class="progress" data-toggle="tooltip" data-html="true" data-placement="bottom" | ||
title="{% translate 'POINTS' %}: <span class='text-nowrap'>{{ formatted_points }} / {{ max }}</span>{% if required %} {% translate 'POINTS_TO_PASS' %}: <span class='text-nowrap'>{{ required }}</span>{% endif %}"> | ||
<div class="progress-bar progress-bar-striped progress-bar-{% if percentage >= personalized_points_goal %}info{% elif full_score %}success{% elif passed %}warning{% else %}danger{% endif %}" | ||
<div class="progress-bar progress-bar-striped progress-bar-{% if full_score %}success{% elif percentage >= personalized_points_module_goal %}primary{% elif passed %}warning{% else %}danger{% endif %}" | ||
rel="progressbar" aria-valuenow="{{ points }}" aria-valuemin="0" aria-valuemax="{{ max }}" | ||
style="width:{{ percentage }}%;"></div> | ||
{% if required_percentage %} | ||
<div class="required-points" style="left:{{ required_percentage }}%"></div> | ||
{% endif %} | ||
{% if personalized_points_module_goal %} | ||
<link rel="stylesheet" href="{% static 'exercise/css/goal_points.css' %}" /> | ||
<div class="goal-points" style="left:{{ personalized_points_module_goal }}%"></div> | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- points_goal_modal.html --> | ||
<div id="pointsGoalModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="pointsGoalModalLabel"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<h4 class="modal-title" id="pointsGoalModalLabel">Set points goal for module {{module.name}}</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<form method="post" action="{% url 'save_points_goal' %}"> | ||
{% csrf_token %} | ||
<div class="form-group"> | ||
<label for="points-goal" class="control-label">Points Goal:</label> | ||
<input type="text" class="form-control" id="points-goal" name="points_goal" placeholder="Enter points or percentage (e.g., 50 or 50%)"> | ||
</div> | ||
<!-- Hidden fields to automatically send more information --> | ||
<input type="hidden" name="student" value="{{ user.id }}"> | ||
<input type="hidden" id="module" name="module-id" value=""> | ||
|
||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="submit" class="btn btn-primary">Save changes</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters