+
Date: Wed, 18 Dec 2024 22:13:05 +0300
Subject: [PATCH 22/24] fix failing check
---
.../src/views/lessons/LessonCreationPage.vue | 46 -------------------
1 file changed, 46 deletions(-)
diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonCreationPage.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonCreationPage.vue
index f9189ddaf1a..a719a9e3b0c 100644
--- a/kolibri/plugins/coach/assets/src/views/lessons/LessonCreationPage.vue
+++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonCreationPage.vue
@@ -45,33 +45,6 @@
classId() {
return this.$route.params.classId;
},
- recipients() {
- return this.getLearnersForLesson(this.currentLesson);
- },
- resourcesTable() {
- return this.workingResources.map(resource => {
- const content = this.resourceCache[resource.contentnode_id];
- if (!content) {
- return this.missingResourceObj(resource.contentnode_id);
- }
-
- const tally = this.getContentStatusTally(content.content_id, this.recipients);
- const tableRow = {
- ...content,
- node_id: content.id,
- avgTimeSpent: this.getContentAvgTimeSpent(content.content_id, this.recipients),
- tally,
- hasAssignments: Object.values(tally).reduce((a, b) => a + b, 0),
- };
-
- const link = this.resourceLink(tableRow);
- if (link) {
- tableRow.link = link;
- }
-
- return tableRow;
- });
- },
},
created() {
const initClassInfoPromise = this.$store.dispatch('initClassInfo', this.classId);
@@ -104,25 +77,6 @@
}
});
},
- resourceLink(resource) {
- if (resource.hasAssignments) {
- if (resource.kind === this.ContentNodeKinds.EXERCISE) {
- return this.classRoute(
- this.group
- ? 'ReportsGroupReportLessonExerciseLearnerListPage'
- : 'ReportsLessonExerciseLearnerListPage',
- { exerciseId: resource.content_id },
- );
- } else {
- return this.classRoute(
- this.group
- ? 'ReportsGroupReportLessonResourceLearnerListPage'
- : 'ReportsLessonResourceLearnerListPage',
- { resourceId: resource.content_id },
- );
- }
- }
- },
},
};
From 12e2a323709b252524fbc825ed7163ff73c720a9 Mon Sep 17 00:00:00 2001
From: Allan Otodi Opeto <103313919+AllanOXDi@users.noreply.github.com>
Date: Wed, 18 Dec 2024 22:37:41 +0300
Subject: [PATCH 23/24] themetoken
---
.../lessons/LessonSummaryPage/sidePanels/SelectedResources.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/SelectedResources.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/SelectedResources.vue
index f20b5d0c27a..7358ce092d8 100644
--- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/SelectedResources.vue
+++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/SelectedResources.vue
@@ -140,7 +140,7 @@
computed: {
lessonOrderListButtonBorder() {
return {
- borderBottom: `1px solid ${this.$themePalette.grey.v_200}`,
+ borderBottom: `1px solid ${this.$themeTokens.fineLine}`,
height: `auto`,
width: `100%`,
};
From 2218fbb34e62c115926e665d6d574fd3d8e6976c Mon Sep 17 00:00:00 2001
From: Allan Otodi Opeto <103313919+AllanOXDi@users.noreply.github.com>
Date: Thu, 19 Dec 2024 21:09:18 +0300
Subject: [PATCH 24/24] clean up code
---
.../ManageSelectedLessonResource.vue | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/ManageSelectedLessonResource.vue b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/ManageSelectedLessonResource.vue
index bdd4e3137e7..25eee245b98 100644
--- a/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/ManageSelectedLessonResource.vue
+++ b/kolibri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/ManageSelectedLessonResource.vue
@@ -89,7 +89,7 @@
showModal.value = false;
}
- function hasModifiedArray() {
+ function hasModifiedResource() {
hasArrayChanged.value = true;
}
@@ -109,7 +109,7 @@
showModal,
closeModal,
closeSidePanel,
- hasModifiedArray,
+ hasModifiedResource,
};
},
data() {
@@ -118,17 +118,18 @@
};
},
computed: {
+ // we will have to move this to composable after the final refactor
+ // leaving it for now to guide the process
...mapState('lessonSummary', ['currentLesson', 'workingResources', 'resourceCache']),
},
mounted() {
- setTimeout(() => {
- this.getResources();
- }, 2000);
+ this.getResources();
},
+
methods: {
removeResource(id) {
this.resources = this.resources.filter(lesson => lesson.id !== id);
- this.hasModifiedArray();
+ this.hasModifiedResource();
},
navigateToParent(id) {
this.$router.push({
@@ -136,6 +137,8 @@
params: { classId: this.$route.params.classId, lessonId: id },
});
},
+ // we will have to move this to the composable after the final refactor
+ // leaving it for now to guide the process
getResources() {
const response = this.workingResources.map(resource => {
const content = this.resourceCache[resource.contentnode_id];
@@ -166,6 +169,8 @@
this.resources = results;
});
},
+ // we will have to move this to the composable after the final refactor
+ // leaving it for now to guide the process
resourceLink(resource) {
if (resource.hasAssignments) {
if (resource.kind === this.ContentNodeKinds.EXERCISE) {
@@ -184,7 +189,6 @@
}
},
},
- $trs: {},
};