|
@ -56,16 +56,15 @@ function getLocation(id: string, solution: boolean): TaskLocation | null { |
|
|
const m = /^(\d+)-(Z?)(\d)-(\d)$/.exec(id) |
|
|
const m = /^(\d+)-(Z?)(\d)-(\d)$/.exec(id) |
|
|
if (!m) return null |
|
|
if (!m) return null |
|
|
const [_, rocnik, z, serie, uloha] = m |
|
|
const [_, rocnik, z, serie, uloha] = m |
|
|
|
|
|
const urlX = solution ? "reseni" : "zadani" |
|
|
if (z == 'Z') { |
|
|
if (z == 'Z') { |
|
|
const urlX = solution ? "reseni" : "zadani" |
|
|
|
|
|
return { |
|
|
return { |
|
|
url: `z/ulohy/${rocnik}/${urlX}${serie}.html`, |
|
|
url: `/z/ulohy/${rocnik}/${urlX}${serie}.html`, |
|
|
startElement: `task-${id}` |
|
|
startElement: `task-${id}` |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
const urlX = solution ? "solution" : "tasks" |
|
|
|
|
|
return { |
|
|
return { |
|
|
url: `tasks/${rocnik}/${urlX}${serie}.html`, |
|
|
url: `/ulohy/${rocnik}/${urlX}${serie}.html`, |
|
|
startElement: `task-${id}` |
|
|
startElement: `task-${id}` |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|