Skip to content
Snippets Groups Projects
Verified Commit 2dfe44de authored by magicfelix's avatar magicfelix
Browse files

Pass week documentation preference to frontend

parent 04523235
No related branches found
No related tags found
1 merge request!284Draft: Redesign entering of lesson documentation
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
:groups="data.lesson.groups" :groups="data.lesson.groups"
:excuseTypes="data.excuseTypes" :excuseTypes="data.excuseTypes"
:extraMarks="data.extraMarks" :extraMarks="data.extraMarks"
:documentLessonTopicsByWeek="documentlessontopicsbyweek"
/> />
</v-col> </v-col>
</v-row> </v-row>
...@@ -45,6 +46,7 @@ export default { ...@@ -45,6 +46,7 @@ export default {
UpdateIndicator, UpdateIndicator,
LessonDocumentations LessonDocumentations
}, },
props: [ "documentlessontopicsbyweek" ],
methods: { methods: {
processDataChange(event) { processDataChange(event) {
this.status = CHANGES; this.status = CHANGES;
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
import LessonDocumentation from "./LessonDocumentation.vue"; import LessonDocumentation from "./LessonDocumentation.vue";
export default { export default {
components: { LessonDocumentation }, components: { LessonDocumentation },
props: [ "lessonDocumentations","plannedLessonperiodsDatetimes", "groups", "excuseTypes", "extraMarks" ], props: [ "lessonDocumentations","plannedLessonperiodsDatetimes", "groups", "excuseTypes", "extraMarks", "documentLessonTopicsByWeek" ],
name: "lesson-documentations", name: "lesson-documentations",
data () { data () {
return { return {
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
{% endblock %} {% endblock %}
{% block browser_title %}{% trans "Coursebook" %} {{ lesson }}{% endblock %} {% block browser_title %}{% trans "Coursebook" %} {{ lesson }}{% endblock %}
{% block content %} {% block content %}
<router-view/> <router-view documentlessontopicsbyweek="{{ documentLessonTopicsByWeek }}"/><!-- FIXME -->
{% endblock %} {% endblock %}
{% block extra_body %} {% block extra_body %}
{% render_bundle "aleksis.apps.alsijil" %} {% render_bundle "aleksis.apps.alsijil" %}
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -1363,6 +1363,11 @@ class CoursebookView(DetailView): ...@@ -1363,6 +1363,11 @@ class CoursebookView(DetailView):
template_name = "alsijil/class_register/coursebook.html" template_name = "alsijil/class_register/coursebook.html"
permission_required = "" # FIXME permission_required = "" # FIXME
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["documentLessonTopicsByWeek"] = get_site_preferences()["alsijil__document_lesson_topics_by_week"]
return context
class SelectCoursebookView(TemplateView): class SelectCoursebookView(TemplateView):
template_name = "alsijil/class_register/select_coursebook.html" template_name = "alsijil/class_register/select_coursebook.html"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment