Skip to content

Commit

Permalink
fix: level selection
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 5, 2024
1 parent 1623dda commit da51da0
Showing 1 changed file with 36 additions and 32 deletions.
68 changes: 36 additions & 32 deletions game/templates/game/python_den_level_selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,45 +70,49 @@ <h4>Introduction to Python</h4>

<div id="collapse-{{episode.id}}" aria-labelledby="episode-{{episode.id}}" class="collapse">
<div class="panel-body">
{% if user|is_logged_in %}
<div class="col-sm-7 python-den-level">
<a href="https://editor.raspberrypi.org/en/projects/blank-python-starter" target="_blank">{{episode.name}}</a>
</div>
{% if user|is_logged_in_as_teacher %}
<div class="col-sm-3 python-den-level">
<a href="{{worksheet.lesson_plan_link}}" class="button button--level button--icon" target="_blank">
Lesson plan<span class="iconify" data-icon="mdi:open-in-new"></span></a>
{% for worksheet in episode.worksheets %}
{% if not user|is_logged_in or user.new_student.class_field in worksheet.locked_classes.all %}
{% if not user|is_logged_in %}
<p class="text--warning">In order to access the full content for this course, please log in.</p>
{% endif %}
<div class="col-sm-10 python-den-level">
<a class="disabled">{{episode.name}}</a>
</div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.slides_link}}" class="button button--level button--icon" target="_blank">
Slides<span class="iconify" data-icon="mdi:tray-arrow-down"></span></a>
</div>
{% elif user|is_independent_student %}
<div class="col-sm-3 python-den-level">
<a href="{{worksheet.indy_worksheet_link}}" class="button button--level button--icon" target="_blank">
<a class="button button--level button--icon disabled">
Worksheet<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.video_link}}" class="button button--level button--icon" target="_blank">
Video<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
{% else %}
<div class="col-sm-3"></div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.student_worksheet_link}}" class="button button--level button--icon" target="_blank">
Worksheet<span class="iconify" data-icon="mdi:open-in-new"></span></a>
<div class="col-sm-7 python-den-level">
<a href="https://editor.raspberrypi.org/en/projects/blank-python-starter" target="_blank">{{episode.name}}</a>
</div>
{% if user|is_logged_in_as_teacher %}
<div class="col-sm-3 python-den-level">
<a href="{{worksheet.lesson_plan_link}}" class="button button--level button--icon" target="_blank">
Lesson plan<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.slides_link}}" class="button button--level button--icon" target="_blank">
Slides<span class="iconify" data-icon="mdi:tray-arrow-down"></span></a>
</div>
{% elif user|is_independent_student %}
<div class="col-sm-3 python-den-level">
<a href="{{worksheet.indy_worksheet_link}}" class="button button--level button--icon" target="_blank">
Worksheet<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.video_link}}" class="button button--level button--icon" target="_blank">
Video<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
{% else %}
<div class="col-sm-3"></div>
<div class="col-sm-2 python-den-level">
<a href="{{worksheet.student_worksheet_link}}" class="button button--level button--icon" target="_blank">
Worksheet<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
{% endif %}
{% endif %}
{% else %}
<p class="text--warning">In order to access the full content for this course, please log in.</p>
<div class="col-sm-10 python-den-level">
<a class="disabled">{{episode.name}}</a>
</div>
<div class="col-sm-2 python-den-level">
<a class="button button--level button--icon disabled">
Worksheet<span class="iconify" data-icon="mdi:open-in-new"></span></a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
Expand Down

0 comments on commit da51da0

Please sign in to comment.