Skip to content

Commit

Permalink
fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Leste committed Dec 20, 2024
1 parent e5527aa commit e395fa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
6 changes: 3 additions & 3 deletions course/templates/course/staff/all_exercise_submissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
{% load colortag %}

{% block title %}{% translate "ALL_SUBMISSIONS" %} | {{ block.super }}{% endblock %}
{% block view_tag %}All Submissions{% endblock %}
{% block view_tag %}{% translate "ALL_SUBMISSIONS" %}{% endblock %}

{% block breadcrumblist %}
{{ block.super }}
<li class="active">All Submissions</li>
<li class="active">{% translate "ALL_SUBMISSIONS" %}</li>
{% endblock %}

{% block columns %}
Expand Down Expand Up @@ -60,7 +60,7 @@
{% translate "ASSESSED_MANUALLY" %}
</th>
<th data-filter-type="none" data-order-disable="true">{% translate "INSPECT" %}</th>
<th>Exercise</th>
<th>{% translate "EXERCISE" %}</th>
</tr>
</thead>
<tbody>
Expand Down
24 changes: 10 additions & 14 deletions course/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,23 @@
from django.utils.text import format_lazy
from django.utils.translation import check_for_language
from django.utils.translation import gettext_lazy as _
from django.views.generic import ListView

from authorization.permissions import ACCESS

from exercise.cache.hierarchy import NoSuchContent
from exercise.exercise_models import BaseExercise
from exercise.models import LearningObject
from exercise.staff_views import ListSubmissionsView
from exercise.submission_models import Submission, SubmissionQuerySet, SubmissionTagging
from exercise.viewbase import ExerciseListBaseView, ExerciseMixin
from exercise.submission_models import Submission

#from exercise.views import ResultView
from lib.helpers import settings_text, remove_query_param_from_url, is_ajax
from lib.viewbase import BaseTemplateView, BaseRedirectMixin, BaseFormView, BaseView, BaseRedirectView
from userprofile.viewbase import UserProfileView
from .forms import GroupsForm, GroupSelectForm
from .models import Course, CourseInstance, CourseModule, Enrollment, SubmissionTag
from .models import Course, CourseInstance, CourseModule, Enrollment
from .permissions import EnrollInfoVisiblePermission
from .renders import group_info_context
from .viewbase import CourseModuleBaseView, CourseInstanceMixin, EnrollableViewMixin, CourseMixin, CourseInstanceBaseView
from .viewbase import CourseModuleBaseView, CourseInstanceMixin,\
EnrollableViewMixin, CourseMixin, CourseInstanceBaseView


class HomeView(UserProfileView):
Expand Down Expand Up @@ -386,7 +385,7 @@ def post(self, request, *args, **kwargs):
)
request.REQUEST_LANG = lang_code
return response

class AllSubmissionsView(CourseInstanceBaseView):
access_mode = ACCESS.ASSISTANT
template_name = "course/staff/all_exercise_submissions.html"
Expand All @@ -410,19 +409,16 @@ def get_common_objects(self):
'course_instance': self.instance,
'is_teacher': self.instance.is_teacher(self.request.user),
})

self.count = len(row_data)
self.limited = self.request.GET.get('limited', False)
self.submission_data = row_data[:self.default_limit] if self.limited else row_data
self.not_all_url = self.url_without_limited + "?limited=true"
self.all_url = self.url_without_limited

self.note('submission_data',
'count',
'default_limit',
self.note('submission_data',
'count',
'default_limit',
'tags',
'limited',
'not_all_url',
'all_url')


0 comments on commit e395fa8

Please sign in to comment.