How to create multi-page course pages #193
-
Is there a way to create multi-page course pages with LiaScript? So far I have only found examples of how to distribute individual Markdown files with LiaScript. However, my courses usually consist of a kind of overview page (Readme.md) containing links to the individual lessons (also Markdown files somewhere in a folder structure in the same repo). When I render this Readme.md via LiaScript, all the links are present, only the referenced markdown files are not rendered, but displayed in raw format. (Of course, I could put every single lesson into ILIAS as a LiaScript course for the students, but that's quite some effort and it's not really nice on the students' mobile phones because every lesson gets then its own “app”.) I have tried to concatenate all Markdown files as a single large file. But this results in a quite large and virtually unusable menu in the sidebar. In addition, I then have to adapt all local links in the result file into internal links to headings, which is also not a trivial task (due to the folder structure). Do you have any ideas on how I could implement this? I really like the realisation of the quizzes :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi cagix, |
Beta Was this translation helpful? Give feedback.
-
Hi @cagix ... could you try the following: <!--
@open
<script modify="false" run-once>
const origin = window.location.origin;
const pathname = window.location.pathname;
`LIASCRIPT: [@0](${origin + pathname}?@1)`
</script>
@end
-->
# Course Main Title
This is a link to the first lesson of the course:
@[open(Title of the course)](course/lesson_1.md) This will construct a new LiaScript link and put it out as a result. In my case it looks like this: The You can replace the However, quizzes cannot be stored this way in a LMS if SCORM is used and the course is sepparated into multiple files. The quizzes need to be known before the course is loaded and the main README is analyzed and an index on all quizzes and surveys defined here is stored in the LMS. I hope this makes sense ;-) |
Beta Was this translation helpful? Give feedback.
Hi @cagix ... could you try the following:
This will construct a new LiaScript link and put it out as a result. In my case it looks like this:
The
@open
macro is defined in the main-comment. It will inject a script to which the title is passed as the first argument and the relative URL is passed as the second. Since the LiaScript interpreter is used either from our website or from wit…