From cb1821e42210a394ec4836b8b64870f4b611e0b7 Mon Sep 17 00:00:00 2001 From: brunodaemon <63315738+brunodaemon@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:12:26 +0000 Subject: [PATCH] Modify column Name content from username to first_name + last_name. Also removes column Slack with slackid from the students list. --- __init__.py | 0 portal/__init__.py | 0 portal/portal/__init__.py | 7 ------- portal/portal/academy/views.py | 3 ++- portal/portal/templates/academy/instructor/user_list.html | 6 +++++- 5 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 __init__.py create mode 100644 portal/__init__.py delete mode 100644 portal/portal/__init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/portal/__init__.py b/portal/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/portal/portal/__init__.py b/portal/portal/__init__.py deleted file mode 100644 index 3fff62c9..00000000 --- a/portal/portal/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -__version__ = "0.1.0" -__version_info__ = tuple( - [ - int(num) if num.isdigit() else num - for num in __version__.replace("-", ".", 1).split(".") - ], -) diff --git a/portal/portal/academy/views.py b/portal/portal/academy/views.py index 431e9dd4..5cbfb762 100644 --- a/portal/portal/academy/views.py +++ b/portal/portal/academy/views.py @@ -140,7 +140,8 @@ class StudentUnitDetailView(StudentViewsMixin, BaseUnitDetailView): class InstructorUserListView(InstructorViewsMixin, ListView): model = get_user_model() - queryset = get_user_model().objects.filter(is_student=True, failed_or_dropped=False) + queryset = model.objects.filter(is_student=True, failed_or_dropped=False) + #queryset = get_user_model().objects.filter(is_student=True, failed_or_dropped=False) template_name = "academy/instructor/user_list.html" def get_queryset(self): diff --git a/portal/portal/templates/academy/instructor/user_list.html b/portal/portal/templates/academy/instructor/user_list.html index 02fd0634..53efda35 100644 --- a/portal/portal/templates/academy/instructor/user_list.html +++ b/portal/portal/templates/academy/instructor/user_list.html @@ -18,7 +18,9 @@

Name + {% comment %} Slack + {% endcomment %} Submission Date Total Eligible for graduation @@ -37,8 +39,10 @@

{{ obj.user.username }} + {{ obj.user.first_name }} {{ obj.user.last_name }} + {% comment %} {{ obj.user.slack_member_id }} + {% endcomment %} {{ obj.submission_date }} {{ obj.total_score }}/{{ max_score }} {% if obj.user.can_graduate %}Yes{% else %}No{% endif %}