Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 760
|
It seems the problem occurs because changes were made in minified questions.js file. We sent by email the link to original questions.js file. Use it to add changes.
Regards,
ARI Soft
|
|
|
|
|
Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 0
|
Thanks a lot for your kind assistance!
Done that, the question now loads and looks fine but options are not clickable.
No matter what answer I click on - nothing happens
The way it is now - t.ly/EGeg
|
|
|
|
|
Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 760
|
Replace the following code:
Code: |
if (this.questionData) {
for (var i = 0, cnt = this.questionData.length; i < cnt; i++) {
var dataItem = this.questionData[i],
checked = dataItem['selected'] || false;
answers += AS.core.format(itemTemplate, {
hidQueId: dataItem.hidQueId,
ctrlId: id,
questionId: this.questionId,
answer: dataItem['tbxAnswer'],
choice: LM.getMessage('COM_ARIQUIZ_CHOICE'),
num: AQ.questions.util.getAnswerNumber(i + 1, this.answersOrderType),
checked: checked ? ' checked="checked"' : '',
selectedClass: checked ? 'aq-answer-selected' : '',
readonly: readOnly ? ' disabled="disabled"' : ''
})
}
};
return AS.core.format(containerTemplate, {
"containerId": this.getContainerId(),
"answers": answers
});
|
with the following one:
Code: |
var containerId = this.getContainerId();
if (this.questionData) {
for (var i = 0, cnt = this.questionData.length; i < cnt; i++) {
var dataItem = this.questionData[i],
checked = dataItem['selected'] || false;
answers += AS.core.format(itemTemplate, {
hidQueId: dataItem.hidQueId,
ctrlId: id,
questionId: this.questionId,
answer: dataItem['tbxAnswer'],
choice: LM.getMessage('COM_ARIQUIZ_CHOICE'),
num: AQ.questions.util.getAnswerNumber(i + 1, this.answersOrderType),
checked: checked ? ' checked="checked"' : '',
selectedClass: checked ? 'aq-answer-selected' : '',
readonly: readOnly ? ' disabled="disabled"' : '',
containerId: containerId
})
}
};
return AS.core.format(containerTemplate, {
"containerId": containerId,
"answers": answers
});
|
Regards,
ARI Soft
|
|
|
|
|
Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 0
|
Applied the code - still no change (leave it as it is now on the site).
tried using that code everywhere in the document (not only in getRadioViewHtml), no result.
|
|
|
|
|
Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 760
|
It was only need to update the code which we mentioned in our previous post. It seems you also removed your code for itemTemplate so it doesn't work.
Regards,
ARI Soft
|
|
|
|
|
Re:Change Radio Buttons for Answers 4 Years, 1 Month ago
|
Karma: 0
|
no, I followed as you said, and didn't delete that part. Here is the whole new code:
getRadioViewHtml: function (readOnly) {
var id = this.getId(),
answers = '',
containerTemplate = '<div id="#{containerId}" class="aq-singlequestion">#{answers}<br class="aq-clear" /></div>',
itemTemplate =
'<div class="aq-answer-container">\
<div class="aq-answer-label"><label for="sa#{questionId}_#{hidQueId}">#{choice} #{num}</label> <input type="radio" class="aq-singlequestion-ctrl" id="sa#{questionId}_#{hidQueId}" name="#{ctrlId}" value="#{hidQueId}" #{checked} #{readonly} /></div>\
<div class="aq-answer">#{answer}</div>\
<br class="aq-clear" />\
</div>';
var containerId = this.getContainerId();
if (this.questionData) {
for (var i = 0, cnt = this.questionData.length; i < cnt; i++) {
var dataItem = this.questionData[i],
checked = dataItem['selected'] || false;
answers += AS.core.format(itemTemplate, {
hidQueId: dataItem.hidQueId,
ctrlId: id,
questionId: this.questionId,
answer: dataItem['tbxAnswer'],
choice: LM.getMessage('COM_ARIQUIZ_CHOICE'),
num: AQ.questions.util.getAnswerNumber(i + 1, this.answersOrderType),
checked: checked ? ' checked="checked"' : '',
selectedClass: checked ? 'aq-answer-selected' : '',
readonly: readOnly ? ' disabled="disabled"' : '',
containerId: containerId
})
}
};
|
|
|
|
|
|