-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fb5439
commit f401745
Showing
7 changed files
with
369 additions
and
6 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
63 changes: 63 additions & 0 deletions
63
courses/migrations/0017_alter_projectsubmission_learning_in_public_links_and_more.py
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,63 @@ | ||
# Generated by Django 4.2.14 on 2024-10-10 12:48 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('courses', '0016_enrollment_about_me_enrollment_github_url_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='projectsubmission', | ||
name='learning_in_public_links', | ||
field=models.JSONField(blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='submission', | ||
name='learning_in_public_links', | ||
field=models.JSONField(blank=True, help_text='Links where students talk about the course', null=True), | ||
), | ||
migrations.CreateModel( | ||
name='HomeworkStatistics', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('total_submissions', models.IntegerField(default=0)), | ||
('min_questions_score', models.IntegerField(blank=True, null=True)), | ||
('max_questions_score', models.IntegerField(blank=True, null=True)), | ||
('avg_questions_score', models.FloatField(blank=True, null=True)), | ||
('median_questions_score', models.FloatField(blank=True, null=True)), | ||
('q1_questions_score', models.FloatField(blank=True, null=True)), | ||
('q3_questions_score', models.FloatField(blank=True, null=True)), | ||
('min_total_score', models.IntegerField(blank=True, null=True)), | ||
('max_total_score', models.IntegerField(blank=True, null=True)), | ||
('avg_total_score', models.FloatField(blank=True, null=True)), | ||
('median_total_score', models.FloatField(blank=True, null=True)), | ||
('q1_total_score', models.FloatField(blank=True, null=True)), | ||
('q3_total_score', models.FloatField(blank=True, null=True)), | ||
('min_learning_in_public_score', models.IntegerField(blank=True, null=True)), | ||
('max_learning_in_public_score', models.IntegerField(blank=True, null=True)), | ||
('avg_learning_in_public_score', models.FloatField(blank=True, null=True)), | ||
('median_learning_in_public_score', models.FloatField(blank=True, null=True)), | ||
('q1_learning_in_public_score', models.FloatField(blank=True, null=True)), | ||
('q3_learning_in_public_score', models.FloatField(blank=True, null=True)), | ||
('min_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('max_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('avg_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('median_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('q1_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('q3_time_spent_lectures', models.FloatField(blank=True, null=True)), | ||
('min_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('max_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('avg_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('median_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('q1_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('q3_time_spent_homework', models.FloatField(blank=True, null=True)), | ||
('last_calculated', models.DateTimeField(auto_now=True)), | ||
('homework', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='statistics', to='courses.homework')), | ||
], | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% load static %} | ||
{% load stats_filters %} | ||
|
||
{% block breadcrumbs %} | ||
<li><a href="{% url 'course' course.slug %}">{{ course.title }}</a></li> | ||
<li><a href="{% url 'homework' course.slug homework.slug %}">{{ homework.title }}</a></li> | ||
|
||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<h1 class="mb-4"> | ||
{{ homework.title }} statistics | ||
</h1> | ||
|
||
<div class="card mb-4"> | ||
<div class="card-body"> | ||
<h5 class="card-title"> | ||
<i class="fas fa-users"></i> Total submissions | ||
</h5> | ||
<p class="card-text display-4">{{ stats.total_submissions }}</p> | ||
</div> | ||
</div> | ||
|
||
|
||
{% for field_name, field_stats, field_icon in stats.get_stat_fields %} | ||
<div class="card mb-3"> | ||
<div class="card-header"> | ||
<h5 class="mb-0"> | ||
<i class="{{ field_icon }}"></i> {{ field_name }} | ||
</h5> | ||
</div> | ||
<div class="card-body pt-4 pb-3"> | ||
<div class="row g-2 mb-0"> | ||
{% for value, label, icon in field_stats %} | ||
<div class="col-md-4 col-6"> | ||
<h6 class="mb-1"><i class="{{ icon }}"></i> {{ label }}</h6> | ||
<p class="lead mb-2">{{ value|floatformat:0 }}</p> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
<p class="text-muted"> | ||
<i class="fas fa-calendar-alt"></i> Calculated: {{ stats.last_calculated }} | ||
</p> | ||
|
||
|
||
{% endblock %} |
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
Oops, something went wrong.