Commit 10410f3b authored by Cornee Traas's avatar Cornee Traas
Browse files

Temporary cohorts fix until platform api branch is merged

parent b09edf13
Pipeline #2503 failed with stages
in 1 minute and 3 seconds
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
for (let item of items) { for (let item of items) {
if (item.lesson !== lastLesson) { if (item.lesson !== lastLesson) {
lastLesson = item.lesson; lastLesson = item.lesson;
lessons.push([item]); lessons.push([item,]);
} else { } else {
lessons[lessons.length - 1].push(item) lessons[lessons.length - 1].push(item)
} }
...@@ -52,10 +52,13 @@ export default { ...@@ -52,10 +52,13 @@ export default {
"/quizzes/" + "/quizzes/" +
item.assessment_id + item.assessment_id +
"-" + "-" +
item.assessment_version item.assessment_version,
}; };
} else { } else {
return { URL: "", name: "unknown" }; return {
URL: "",
name: "unknown",
};
} }
} else if (item.category === "lecture") { } else if (item.category === "lecture") {
return { return {
...@@ -65,7 +68,7 @@ export default { ...@@ -65,7 +68,7 @@ export default {
"/" + "/" +
course + course +
"/videos/" + "/videos/" +
item.item_id item.item_id,
}; };
} else if (item.category === "peer") { } else if (item.category === "peer") {
return { return {
...@@ -75,10 +78,13 @@ export default { ...@@ -75,10 +78,13 @@ export default {
"/" + "/" +
course + course +
"/assignments/" + "/assignments/" +
item.item_id item.item_id,
}; };
} }
return { URL: "", name: "unknown" }; return {
URL: "",
name: "unknown",
};
}, },
/** /**
...@@ -109,10 +115,10 @@ export default { ...@@ -109,10 +115,10 @@ export default {
getQueryParams(filters) { getQueryParams(filters) {
var params = []; var params = [];
if (filters.from !== null && filters.from !== undefined) { if (filters.from !== null && filters.from !== undefined) {
params.push(["from_date", filters.from,]); params.push(["from_date", filters.from, ]);
} }
if (filters.to !== null && filters.to !== undefined) { if (filters.to !== null && filters.to !== undefined) {
params.push(["to_date", filters.to,]); params.push(["to_date", filters.to, ]);
} }
var queryString = new URLSearchParams(params).toString(); var queryString = new URLSearchParams(params).toString();
if (queryString === "") { if (queryString === "") {
...@@ -180,8 +186,8 @@ export default { ...@@ -180,8 +186,8 @@ export default {
.post(this.apiUrl() + `/users/forgot_password/`, { .post(this.apiUrl() + `/users/forgot_password/`, {
email: email, email: email,
}, { }, {
headers: this.authHeader(), headers: this.authHeader(),
}) })
}, },
getUser() { getUser() {
...@@ -275,7 +281,7 @@ export default { ...@@ -275,7 +281,7 @@ export default {
// Actions API calls // Actions API calls
getActions(platformId, courseId, filters) { getActions(platformId, courseId, filters) {
return axios return axios
.get(this.apiUrl() + `/actions/${platformId}/${courseId}/` + this.getQueryParams(filters), { .get(this.apiUrl() + `/actions/default/${courseId}/` + this.getQueryParams(filters), {
headers: this.authHeader(), headers: this.authHeader(),
}) })
}, },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment