Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify column Name content from username to first_name + last_name. A… #320

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added __init__.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be removed since this isn't a package.

Empty file.
Empty file added portal/__init__.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also isn't a package yet, so an init shouldn't go here.

Empty file.
7 changes: 0 additions & 7 deletions portal/portal/__init__.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this init?

This file was deleted.

3 changes: 2 additions & 1 deletion portal/portal/academy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok to make this change, but please don't leave commented code 🙏 You can remove the second line.

template_name = "academy/instructor/user_list.html"

def get_queryset(self):
Expand Down
6 changes: 5 additions & 1 deletion portal/portal/templates/academy/instructor/user_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ <h1><a href="{% url 'academy:instructor-user-list' %}" class="text-dark" title="
<thead>
<tr>
<th scope="col" rowspan="2">Name</th>
{% comment %}
<th scope="col" rowspan="2">Slack</th>
{% endcomment %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simply remove it. No need to comment lines of code.

<th scope="col" rowspan="2">Submission Date</th>
<th scope="col" rowspan="2">Total</th>
<th scope="col" rowspan="2">Eligible for graduation</th>
Expand All @@ -37,8 +39,10 @@ <h1><a href="{% url 'academy:instructor-user-list' %}" class="text-dark" title="
<tbody>
{% for obj in object_list %}
<tr>
<th><a href="{% add_query_param 'user_id' obj.user.id %}" class="text-dark" title="Filter by student">{{ obj.user.username }}</a></th>
<th><a href="{% add_query_param 'user_id' obj.user.id %}" class="text-dark" title="Filter by student">{{ obj.user.first_name }} {{ obj.user.last_name }}</a></th>
{% comment %}
<td><a href="{{ workspace_url }}{{ obj.user.slack_member_id }}" target="_blank" class="text-dark">{{ obj.user.slack_member_id }}</a></td>
{% endcomment %}
<td><a href="{% add_query_param 'submission_date' obj.submission_date %}" class="text-dark"> {{ obj.submission_date }} </a></td>
<td><a href="{% add_query_param 'score__gte' obj.total_score %}" class="text-dark">{{ obj.total_score }}&#47;{{ max_score }}</a></td>
<th><a href="{% add_query_param 'can_graduate' obj.user.can_graduate %}" class="text-dark" title="Filter by graduation status">{% if obj.user.can_graduate %}Yes{% else %}No{% endif %}</a></th>
Expand Down
Loading