-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add gradebook ref to courses; Add Useful to teaching tab; Color panel headings of graduated student profiles; Add html parse to honor code #801
Changes from all commits
d0cdcc0
e2bfe34
ebddd75
a7ee4df
fb7e2e2
1a9c907
8f7527f
6184cfc
9582838
3ba3f0d
59e25e1
8b4f00f
a6c4e01
747e1c8
fd11ac8
c093933
03f001b
700812a
d9cc663
84be777
88017c5
1acae18
5e061b8
f9943df
0ffac1d
8f7932e
3f74203
764f1b2
65f88f1
9a50ab9
cca7d80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
from courses.utils import MonthPeriod, extended_month_date_range, get_current_term_pair | ||
from courses.views.calendar import MonthEventsCalendarView | ||
from courses.views.mixins import CourseURLParamsMixin | ||
from info_blocks.constants import CurrentInfoBlockTags | ||
from info_blocks.models import InfoBlock | ||
from learning.calendar import get_all_calendar_events, get_teacher_calendar_events | ||
from learning.gradebook.views import GradeBookListBaseView | ||
from learning.models import Enrollment, StudentAssignment | ||
|
@@ -159,3 +161,14 @@ def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: | |
"student_assignments": student_assignments | ||
} | ||
return context | ||
|
||
class TeachingUsefulListView(PermissionRequiredMixin, generic.ListView): | ||
context_object_name = "faq" | ||
template_name = "learning/study/useful.html" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Не вижу этого template в PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Да, я переиспользовал template, который используется для "Полезного" для студентов. Запрос был на то же самое, только с другим контентом. Поэтому изменения в одном шаблоне должно логично касаться и второго. |
||
permission_required = "teaching.view_faq" | ||
|
||
def get_queryset(self): | ||
return (InfoBlock.objects | ||
.for_site(self.request.site) | ||
.with_tag(CurrentInfoBlockTags.TEACHERS_USEFUL) | ||
.order_by("sort")) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,12 @@ <h2 class="course-main-title"> | |
class="fa fa-pencil-square-o"></i></a>{% endif %}<br> | ||
<small>{{ course.main_branch.name }} / {{ course.semester }}, <a href="{{ course.meta_course.get_absolute_url() }}">посмотреть | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Мне не нравится, что тег There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Исправил |
||
все семестры</a></small> | ||
{% if user.is_curator or user in course.teachers.all()%} | ||
<br><small> | ||
<a href="{{request.build_absolute_uri(url('staff:gradebook', **course.url_kwargs))}}"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А почему тут важно именно absolute_uri? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Потому что ссылка ведет из курса на ведомость. То есть совсем в другую ветку. Можно конечно обойтись без этого, но указать абсолютный адрес для ссылки мне кажется самым простым и одновременно лаконичным решением. |
||
Ведомость</a> | ||
{% endif %} | ||
</small> | ||
</h2> | ||
|
||
<ul class="nav nav-tabs square" role="tablist" id="course-detail-page__tablist"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Все другие пути содержат имя вью более точно. Переименуем?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
По моему путь выдержан в одном тоне с остальными. Также как
TeacherTimetable
превратился вtimetable/
иCalendarPersonalView
вcalendar/
, новый путь оставил только одно слово, отображающее суть. Также и "Полезное" для студентов при вьюшкеUsefulListView
использует путьuseful/
.