tao-test/app/taoQtiItem/views/js/qtiCreator/model/interactions/TextEntryInteraction.js

29 lines
913 B
JavaScript
Raw Normal View History

2022-08-29 20:14:13 +02:00
define([
'lodash',
'taoQtiItem/qtiCreator/model/mixin/editable',
'taoQtiItem/qtiCreator/model/mixin/editableInteraction',
'taoQtiItem/qtiItem/core/interactions/TextEntryInteraction'
], function(_, editable, editableInteraction, Interaction){
"use strict";
var methods = {};
_.extend(methods, editable);
_.extend(methods, editableInteraction);
_.extend(methods, {
getDefaultAttributes : function(){
return {
base : 10,
placeholderText : ''
};
},
afterCreate : function(){
this.createResponse({
baseType:'string',
cardinality:'single'
});
},
createChoice : function(){
throw new Error('text entry interaction has no choice');
}
});
return Interaction.extend(methods);
});