You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.1 KiB
1 lines
1.1 KiB
YUI.add("moodle-question-chooser",function(e,t){function r(){r.superclass.constructor.apply(this,arguments)}var n={CREATENEWQUESTION:"div.createnewquestion",CREATENEWQUESTIONFORM:"div.createnewquestion form",CHOOSERDIALOGUE:"div.chooserdialoguebody",CHOOSERHEADER:"div.choosertitle"};e.extend(r,M.core.chooserdialogue,{initializer:function(){e.all("form").each(function(e){/question\/addquestion\.php/.test(e.getAttribute("action"))&&e.on("submit",this.displayQuestionChooser,this)},this)},displayQuestionChooser:function(t){var r=e.one(n.CREATENEWQUESTION+" "+n.CHOOSERDIALOGUE),i=e.one(n.CREATENEWQUESTION+" "+n.CHOOSERHEADER);this.container===null&&(this.setup_chooser_dialogue(r,i,{}),this.prepare_chooser());var s=t.target.ancestor("form",!0),o=this.container.one("form"),u=s.all('input[type="hidden"]');o.all("input.customfield").remove(),u.each(function(e){o.appendChild(e.cloneNode()).removeAttribute("id").addClass("customfield")}),this.display_chooser(t)}},{NAME:"questionChooser"}),M.question=M.question||{},M.question.init_chooser=function(e){return new r(e)}},"@VERSION@",{requires:["moodle-core-chooserdialogue"]});
|
|
|