feat: integrated exercises into lessons
- an exercise can now be added to a lesson - it is rendered using livecode editor with submit button - remembers the submitted code and shows the submission time Issue #90
This commit is contained in:
14
community/lms/widgets/Exercise.html
Normal file
14
community/lms/widgets/Exercise.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% from "www/macros/livecode.html" import LiveCodeEditorJS, LiveCodeEditor with context %}
|
||||
|
||||
<div class="exercise">
|
||||
<h2>{{ exercise.title }}</h2>
|
||||
<div class="exercise-description">{{frappe.utils.md_to_html(exercise.description)}}</div>
|
||||
|
||||
{% set submission = exercise.get_user_submission() %}
|
||||
|
||||
{{ LiveCodeEditor(exercise.name,
|
||||
code=exercise.code,
|
||||
reset_code=exercise.code,
|
||||
is_exercise=True,
|
||||
last_submitted=submission and submission.creation) }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user