70
70
{% endblock %}
71
71
72
72
{% block breadcrumbs %}
73
- < li class ="breadcrumb-item active " aria-current ="page "> < a href ="{% url 'course' course.slug %} "> {{ course.title }}</ a > </ li >
74
- {% endblock breadcrumbs %}
73
+ < li class ="breadcrumb-item active " aria-current ="page "> < a href ="{% url 'course' course.slug %} "> {{ course.title }}</ a > </ li >
74
+ {% endblock %}
75
+
75
76
{% block content %}
76
77
< div class ="homework-container ">
77
- < h2 class ="homework-title text-center ">
78
+ < h2 class ="homework-title mb-3 text-center ">
78
79
{{ homework.title }} for
79
80
< a href ="{% url 'course' course.slug %} "> {{ course.title }}</ a >
80
81
</ h2 >
@@ -110,8 +111,8 @@ <h2 class="homework-title text-center">
110
111
{% endif %}
111
112
112
113
< div class ="homework-meta ">
113
- < p class ="text-muted mb-2 "> {{ homework.description }}</ p >
114
- < p class =" mb-0 " > Due date: < span class ="local-date font-weight-bold "> {{ homework.due_date |date:"c" }}</ span > (local time)</ p >
114
+ < p class ="text-muted "> {{ homework.description }}</ p >
115
+ < p > Due date: < span class ="local-date "> {{ homework.due_date |date:"c" }}</ span > (local time)</ p >
115
116
</ div >
116
117
117
118
{% if not is_authenticated %}
@@ -128,7 +129,7 @@ <h3 class="mb-3">Questions</h3>
128
129
{% endif %}
129
130
130
131
{% for question, answer in question_answers %}
131
- < div class ="question ">
132
+ < div class ="mb-3 question ">
132
133
< p class ="question-text ">
133
134
Question {{ forloop.counter }}. {{ question.text }}
134
135
{% if question.scores_for_correct_answer != 0 %}
@@ -185,13 +186,120 @@ <h3 class="mb-3">Questions</h3>
185
186
</ div >
186
187
{% endfor %}
187
188
189
+ {% if homework.homework_url_field %}
190
+ < div class ="mb-3 question ">
191
+ < label for ="homework_url " class ="question-text ">
192
+ Homework URL
193
+ < i
194
+ class ="fas fa-question-circle text-muted "
195
+ data-toggle ="tooltip "
196
+ data-placement ="top "
197
+ title ="Link to GitHub or other public code-hosting website ">
198
+ </ i >
199
+ </ label >
200
+ < input
201
+ type ="url "
202
+ class ="form-control "
203
+ id ="homework_url "
204
+ name ="homework_url "
205
+ value ="{{ submission.homework_link|default:'' }} "
206
+ {% if disabled %} disabled {% endif %}
207
+ required
208
+ />
209
+ < div class ="invalid-feedback "> Please provide a valid URL.</ div >
210
+ </ div >
211
+ {% endif %}
212
+
213
+ {% include 'include/learning_in_public_links.html' with course=course learning_in_public_cap=homework.learning_in_public_cap learning_in_public_links=submission.learning_in_public_links disabled=disabled accepting_submissions=accepting_submissions %}
214
+ < script src ="{% static 'learning_in_public.js' %} "> </ script >
215
+
216
+ {% if homework.time_spent_lectures_field %}
217
+ < div class ="mb-3 question ">
218
+ < label for ="time_spent_lectures " class ="question-text ">
219
+ Time spent on lectures (hours) < span class ="text-muted "> (optional)</ span >
220
+ < i
221
+ class ="fas fa-question-circle text-muted "
222
+ data-toggle ="tooltip "
223
+ data-placement ="top "
224
+ title ="How much time (in hours) did you spend on watching lectures and reading? ">
225
+ </ i >
226
+ </ label >
227
+ < input
228
+ type ="number "
229
+ class ="form-control "
230
+ name ="time_spent_lectures "
231
+ id ="time_spent_lectures "
232
+ min ="0 "
233
+ value ="{{ submission.time_spent_lectures|default:'' }} "
234
+ {% if disabled %} disabled {% endif %}
235
+ />
236
+ </ div >
237
+ {% endif %}
238
+
239
+ {% if homework.time_spent_homework_field %}
240
+ < div class ="mb-3 question ">
241
+ < label for ="time_spent_homework " class ="question-text ">
242
+ Time spent on homework (hours) < span class ="text-muted "> (optional)</ span >
243
+ < i
244
+ class ="fas fa-question-circle text-muted "
245
+ data-toggle ="tooltip "
246
+ data-placement ="top "
247
+ title ="How much time (in hours) did you spend on homework? ">
248
+ </ i >
249
+ </ label >
250
+ < input
251
+ type ="number "
252
+ class ="form-control "
253
+ name ="time_spent_homework "
254
+ id ="time_spent_homework "
255
+ min ="0 "
256
+ value ="{{ submission.time_spent_homework|default:'' }} "
257
+ {% if disabled %} disabled {% endif %}
258
+ />
259
+ </ div >
260
+ {% endif %}
261
+
262
+ {% if homework.problems_comments_field %}
263
+ < div class ="mb-3 question ">
264
+ < label for ="problems_comments " class ="question-text ">
265
+ Problems or comments < span class ="text-muted "> (optional)</ span >
266
+ </ label >
267
+ < textarea
268
+ class ="form-control "
269
+ name ="problems_comments "
270
+ id ="problems_comments "
271
+ {% if disabled %} disabled {% endif %}
272
+ > {{ submission.problems_comments|default:'' }}</ textarea >
273
+ </ div >
274
+ {% endif %}
275
+
276
+ {% if course.faq_document_url and homework.faq_contribution_field %}
277
+ < div class ="mb-3 question ">
278
+ < label for ="faq_contribution " class ="question-text ">
279
+ FAQ contribution < span class ="text-muted "> (< a href ="{{ course.faq_document_url }} " target ="_blank "> FAQ document</ a > , optional)</ span >
280
+ < i
281
+ class ="fas fa-question-circle text-muted "
282
+ data-toggle ="tooltip "
283
+ data-placement ="top "
284
+ title ="If you had any problems and resolved it, or helped somebody in Slack, please put the solution to the FAQ. What is the problem you put in FAQ? ">
285
+ </ i >
286
+ </ label >
287
+ < textarea
288
+ class ="form-control "
289
+ name ="faq_contribution "
290
+ id ="faq_contribution "
291
+ {% if disabled %} disabled {% endif %}
292
+ > {{ submission.faq_contribution|default:'' }}</ textarea >
293
+ </ div >
294
+ {% endif %}
295
+
188
296
{% if not homework.is_scored %}
189
297
< div class ="mt-4 text-center ">
190
298
{% if is_authenticated %}
191
299
< button
192
300
id ="submit-button "
193
301
type ="submit "
194
- class ="btn btn-primary btn-lg ">
302
+ class ="btn btn-primary ">
195
303
{% if not submission %}
196
304
Submit
197
305
{% else %}
@@ -206,7 +314,7 @@ <h3 class="mb-3">Questions</h3>
206
314
</ form >
207
315
208
316
{% if submission %}
209
- < p class ="text-muted question-text m-0 mt-3 "> Last submission at: {{ submission.submitted_at|date:"F d, Y H:i" }}</ p >
317
+ < p class ="text-muted question-text m-0 "> Last submission at: {{ submission.submitted_at|date:"F d, Y H:i" }}</ p >
210
318
{% endif %}
211
319
212
320
< script >
0 commit comments