[IMP] Highlight the right answer in MCQ correction mode
bzr revid: rim@openerp.com-20140416101129-t33z38q7ez0358gh
This commit is contained in:
parent
577245bc66
commit
871bb07d65
|
@ -273,7 +273,8 @@ class WebsiteSurvey(http.Controller):
|
|||
return request.website.render('survey.survey_print',
|
||||
{'survey': survey,
|
||||
'token': token,
|
||||
'page_nr': 0})
|
||||
'page_nr': 0,
|
||||
'quizz_correction': True if survey.quizz_mode and token else False})
|
||||
|
||||
@http.route(['/survey/results/<model("survey.survey"):survey>'],
|
||||
type='http', auth='user', multilang=True, website=True)
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
</div>
|
||||
<div t-if="question.display_mode == 'columns' " class="row js_radio">
|
||||
<div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
|
||||
<label>
|
||||
<label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else ''">
|
||||
<input type="radio" t-att-name="prefix" t-att-value='label.id' />
|
||||
<span t-field='label.value'/>
|
||||
</label>
|
||||
|
@ -200,7 +200,7 @@
|
|||
<template id="multiple_choice" name="Multiple choice">
|
||||
<div class="row">
|
||||
<div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
|
||||
<label>
|
||||
<label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else ''">
|
||||
<input type="checkbox" t-att-name="'%s_%s' % (prefix, label.id)" t-att-value='label.id' />
|
||||
<span t-field='label.value'/>
|
||||
</label>
|
||||
|
@ -268,6 +268,7 @@
|
|||
<h2>
|
||||
<span t-field='question.question' />
|
||||
<span t-if="question.constr_mandatory" class="text-danger">*</span>
|
||||
<span t-if="quizz_correction" class="badge" t-att-name="question.id"></span>
|
||||
</h2>
|
||||
<t t-if="question.description"><div class="text-muted" t-field='question.description' /></t>
|
||||
<t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
|
||||
|
|
Loading…
Reference in New Issue