antoniop
committed
on 16 Jan 24
Avoid ambiguity depending on whether the submission is rendered on its
own to the user or to the teacher in feedback mode e.g. as part of th… Show more
Avoid ambiguity depending on whether the submission is rendered on its

own to the user or to the teacher in feedback mode e.g. as part of the

exam protocol

Show less

/lib/inclass-exam-answer.wf (+3 -5)
296 296   foreach {p default} {paste true spellcheck true translation false} {
297 297     if {![$parent_obj property allow_$p $default]} {
298 298       :QM disallow_$p $form_obj
299 299     }
300 300   }
301 301   #$form_obj lappend form_constraints {__item_nr:hidden}
302 302
303 303   #ns_log notice "============ working_form_loader: [$form_obj serialize] "
304 304   ns_log notice "============ working_form_loader returns [$form_obj name] "
305 305
306 306   return $form_obj
307 307 }
308 308
309 309 #
310 310 # Done form loader
311 311 #
312 312 proc done_form_loader {ctx form_name} {
313 313   set obj [$ctx object]
314 314   #ns_log notice "==================================== done_form_loader called"
315 315
  316   set container [$ctx wf_container]
  317
316 318   #
317 319   # Current question and time information are not relevant for a
318 320   # submitted exam. We clear them from the title.
319 321   #
320     :set_title $obj \
  322   $container set_title $obj \
321 323       -prevent_multiple_tabs false
322 324
323     #
324     #
325     #
326     set container [$ctx wf_container]
327 325   if {[$obj exists __feedback_mode] && [$obj set __feedback_mode] > 0} {
328 326     set form_objs [expr {[$obj exists __form_objs] ? [$obj set __form_objs] : ""}]
329 327     set result [$container summary_form $ctx $form_name $form_objs]
330 328   } else {
331 329     $container plain_template $obj
332 330     set result [::xowiki::Form new \
333 331                     -destroy_on_cleanup \
334 332                     -set name en:finished \
335 333                     -form {{<form>
336 334                       <div class='container-fluid'><div class='row'>
337 335                       <div class="col-sm-6"><p><p>#xowf.inclass-exam-already_answered#</div>
338 336                       </div></div>
339 337                       </form>} text/html} \
340 338                     -text {} \
341 339                     -anon_instances t \
342 340                    ]
343 341   }
344 342   #ns_log notice "==================================== done_form_loader DONE"
345 343   return $result
346 344 }