diff --git a/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html b/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html
index 908143db513ddcbbfc0d4719674a9aa2255b058f..ed90f23332283a3ac9e6662d0db71f886d9ca458 100644
--- a/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html
+++ b/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html
@@ -238,7 +238,7 @@
                                 <th>{% trans "Lesson topic" %}</th>
                                 <td>{% firstof register_object.get_lesson_documentation.topic "–" %}</td>
                               </tr>
-                              {% with period.get_lesson_documentation as lesson_documentation %}
+                              {% with register_object.get_lesson_documentation as lesson_documentation %}
                                 {% if lesson_documentation.homework %}
                                   <tr>
                                     <th>{% trans "Homework" %}</th>
@@ -317,7 +317,7 @@
                           <dt>{% trans "Lesson topic" %}</dt>
                           <dd>{% firstof register_object.get_lesson_documentation.topic "–" %}</dd>
 
-                          {% with period.get_lesson_documentation as lesson_documentation %}
+                          {% with register_object.get_lesson_documentation as lesson_documentation %}
                             {% if lesson_documentation.homework %}
                               <dt>{% trans "Homework" %}</dt>
                               <dd>{% firstof register_object.get_lesson_documentation.homework "–" %}</dd>