Skip to content

Commit dcfb09e

Browse files
committed
Fix points visualization
1 parent 75249af commit dcfb09e

2 files changed

Lines changed: 2 additions & 22 deletions

File tree

src/components/PointsBalloon/PartProgress.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,6 @@ const PartProgress = ({ name, data, appliesForStudyRight, t }) => {
9999
/>
100100
</Bar>
101101
</StyledBarChart>
102-
<LargeP>
103-
{t("progressTotal")}{" "}
104-
{Math.floor(Math.min(100, totalProgress * 111.112))}
105-
/100.
106-
</LargeP>
107-
{appliesForStudyRight &&
108-
(getCourseVariant() === "nodl" ? (
109-
<SmallP>{t("noTimelimit")}</SmallP>
110-
) : (
111-
<SmallP>
112-
{t("canApplyForStudyRight")}{" "}
113-
{
114-
allChartData.find(o => o.tool === "Ohjelmointitehtävät")
115-
?.progress
116-
}
117-
%.
118-
</SmallP>
119-
))}
120102
</div>
121103
</PartProgressContainer>
122104
)

src/services/progress.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { fetchProgrammingProgress, getCachedUserDetails } from "./moocfi"
2-
import { fetchCrowdsorcererProgress } from "./crowdsorcerer"
32
import { zip } from "../util/arrays"
43
import { fetchQuizProgress } from "./quiznator"
54
import { fetchQuizzesProgress } from "./quizzes"
@@ -16,11 +15,10 @@ const introductionCourseGroups = [
1615

1716
export async function fetchProgress() {
1817
// await fetchQuizzesProgress()
19-
const serviceIdentifiers = ["Ohjelmointitehtävät", "Kyselyt", "Crowdsorcerer"]
18+
const serviceIdentifiers = ["Programming exercises", "Quizzes"]
2019
const progressesCollection = await Promise.all([
2120
fetchProgrammingProgress(),
2221
fetchQuizzesProgress(),
23-
fetchCrowdsorcererProgress(),
2422
])
2523
const userDetails = await getCachedUserDetails()
2624
const currentCourseVariant = userDetails?.extra_fields?.course_variant
@@ -39,7 +37,7 @@ export async function fetchProgress() {
3937
)
4038
const toBeDeleted = []
4139
Object.entries(progressByGroup).forEach(([group, serviceEntries]) => {
42-
if (!Object.keys(serviceEntries).find(o => o === "Ohjelmointitehtävät")) {
40+
if (!Object.keys(serviceEntries).find(o => o === "Programming exercises")) {
4341
toBeDeleted.push(group)
4442
}
4543
})

0 commit comments

Comments
 (0)