define("editor/assert/js/widget/exercise/exerciseItem",[],function(require,exports,module){function a(a,b,c,d){this.setType(a),this.setSubject(b),this.setTitle(c),this.setOptions(d),this.answer=[]}a.prototype.setType=function(a){this.type=a},a.prototype.setTitle=function(a){a&&("点击此处添加测验题目"==a&&(a=""),this.title=a)},a.prototype.setOptionsNum=function(a){this.options||(this.options=[]);var b=this.options.length;if(a>b)for(;a>b;++b)this.options[b]={type:"",value:""};else b>a&&(this.options=this.options.slice(0,a))},a.prototype.setOptions=function(a,b,c){if(a){if(!b)return void(this.options=a);var _self=this;!c&&a.length?$.each(a,function(a,c){_self.options[a]={type:b,value:"点击此处添加答案"==c?"":c}}):c&&(_self.options[c]={type:b,value:a})}},a.prototype.setSubject=function(a){a&&("请输入标题"==a&&(a=""),this.subject=a)},a.prototype.getCompleteInfo=function(){var _self=this,a="";return this.title?this.answer&&this.answer.length?"3"!==this.type||this.thumbNail&&this.thumbNail.length?$.each(this.options,function(b,c){return!c.value||"2"===_self.type&&"editor/assert/images/btn_gallery_add.jpg"===c.value?(a="请设定答案选项",!1):void 0}):a="请添加本题对应的图片":a="请设定题目的答案":a="请添加测验题目",a},a.prototype.setAnswer=function(a){this.answer=a},a.prototype.setThumbNail=function(a){this.thumbNail=a},module.exports=a});