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 {
for (let item of items) {
if (item.lesson !== lastLesson) {
lastLesson = item.lesson;
lessons.push([item]);
lessons.push([item,]);
} else {
lessons[lessons.length - 1].push(item)
}
......@@ -52,10 +52,13 @@ export default {
"/quizzes/" +
item.assessment_id +
"-" +
item.assessment_version
item.assessment_version,
};
} else {
return { URL: "", name: "unknown" };
return {
URL: "",
name: "unknown",
};
}
} else if (item.category === "lecture") {
return {
......@@ -65,7 +68,7 @@ export default {
"/" +
course +
"/videos/" +
item.item_id
item.item_id,
};
} else if (item.category === "peer") {
return {
......@@ -75,10 +78,13 @@ export default {
"/" +
course +
"/assignments/" +
item.item_id
item.item_id,
};
}
return { URL: "", name: "unknown" };
return {
URL: "",
name: "unknown",
};
},
/**
......@@ -109,10 +115,10 @@ export default {
getQueryParams(filters) {
var params = [];
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) {
params.push(["to_date", filters.to,]);
params.push(["to_date", filters.to, ]);
}
var queryString = new URLSearchParams(params).toString();
if (queryString === "") {
......@@ -275,7 +281,7 @@ export default {
// Actions API calls
getActions(platformId, courseId, filters) {
return axios
.get(this.apiUrl() + `/actions/${platformId}/${courseId}/` + this.getQueryParams(filters), {
.get(this.apiUrl() + `/actions/default/${courseId}/` + this.getQueryParams(filters), {
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