]> git.mjollnir.org Git - moodle.git/commitdiff
fixing all the form names as per new class naming convention (PHP class names are...
authorjamiesensei <jamiesensei>
Thu, 28 Dec 2006 15:43:47 +0000 (15:43 +0000)
committerjamiesensei <jamiesensei>
Thu, 28 Dec 2006 15:43:47 +0000 (15:43 +0000)
23 files changed:
blog/edit.php
course/import/activities/import_form.php
course/import/activities/mod.php
course/import/groups/import_form.php
course/import/groups/mod.php
course/modedit.php
course/request.php
enrol/authorize/enrol.php
enrol/authorize/enrol_form.php
lib/formslib.php
login/change_password.php
login/forgot_password.php
login/signup.php
login/signup_form.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php
mod/data/comment.php
mod/data/lib.php
mod/forum/post.php
mod/glossary/comment.php
mod/glossary/edit.php
mod/survey/details.php
question/type/edit_question_form.php

index d5343add1bfc8540311005a91ca38c85f8c32267..a87591f942aff2fbe902abb3760331b96390367d 100755 (executable)
@@ -69,15 +69,15 @@ if ($action=='delete'){
 }
 
 require_once('edit_form.php');
-$blogpostform = new blog_post_form(null, compact('existing', 'sitecontext'));
+$blogeditform = new blog_edit_form(null, compact('existing', 'sitecontext'));
 
-if ($blogpostform->is_cancelled()){
+if ($blogeditform->is_cancelled()){
     redirect($returnurl);
-} elseif ($blogpostform->no_submit_button_pressed()) {
-    no_submit_button_actions($blogpostform, $sitecontext);
+} elseif ($blogeditform->no_submit_button_pressed()) {
+    no_submit_button_actions($blogeditform, $sitecontext);
 
 
-} elseif ($fromform = $blogpostform->data_submitted()){
+} elseif ($fromform = $blogeditform->data_submitted()){
     //save stuff in db
     switch ($action) {
         case 'add':
@@ -152,8 +152,8 @@ if (!$user = get_record('user', 'id', $userid)) {
 print_header("$SITE->shortname: $strblogs", $SITE->fullname,
                 '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$userid.'">'.fullname($user).'</a> ->
                 <a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$userid.'">'.$strblogs.'</a> -> '.$strformheading,'','',true);
-$blogpostform->set_defaults($post);
-$blogpostform->display();
+$blogeditform->set_defaults($post);
+$blogeditform->display();
 
 
 print_footer();
@@ -162,8 +162,8 @@ print_footer();
 die;
 
 /*****************************   edit.php functions  ***************************/
-function no_submit_button_actions(&$blogpostform, $sitecontext){
-    $mform =& $blogpostform->_form;
+function no_submit_button_actions(&$blogeditform, $sitecontext){
+    $mform =& $blogeditform->_form;
     $data = $mform->exportValues();
     //sesskey has been checked already no need to check that
     //check for official tags to add
@@ -176,7 +176,7 @@ function no_submit_button_actions(&$blogpostform, $sitecontext){
     if (!empty($data['deleteotags']) && !empty($data['otags'])){ // adding official tag
         delete_otags($data['otags'], $sitecontext);
     }
-    $blogpostform->otags_select_setup();
+    $blogeditform->otags_select_setup();
 }
 function delete_otags($tagids, $sitecontext){
     foreach ($tagids as $tagid) {
index 11eca5378822e3f7387254f7417e81b503c88438..4a684b9c1834d2fe1005658da139ea6f8bb50f26 100755 (executable)
@@ -2,7 +2,7 @@
 
 require_once($CFG->libdir.'/formslib.php');
 
-class activities_import_form_1 extends moodleform {
+class course_import_activities_form_1 extends moodleform {
 
        function definition() {
 
@@ -14,11 +14,11 @@ class activities_import_form_1 extends moodleform {
         $mform->addElement('header', 'general', '');//fill in the data depending on page params
                                                     //later using set_defaults
                $mform->addElement('select', 'fromcourse', $text, $options);
-         
+
         // buttons
         $submit_string = get_string('usethiscourse');
         $this->add_action_buttons(false, true, $submit_string);
-        
+
         $mform->addElement('hidden', 'id');
                $mform->setType('id', PARAM_INT);
                $mform->setConstants(array('id'=> $courseid));
@@ -31,21 +31,21 @@ class activities_import_form_1 extends moodleform {
 
 }
 
-class activities_import_form_2 extends moodleform {
+class course_import_activities_form_2 extends moodleform {
 
        function definition() {
 
                global $CFG;
                $mform    =& $this->_form;
-               $courseid = $this->_customdata['courseid'];        
+               $courseid = $this->_customdata['courseid'];
 
         $mform->addElement('header', 'general', '');//fill in the data depending on page params
                                                     //later using set_defaults
                $mform->addElement('text', 'fromcoursesearch', get_string('searchcourses'));
-         
+
         // buttons
         $this->add_action_buttons(false, true, get_string('searchcourses'));
-        
+
         $mform->addElement('hidden', 'id');
                $mform->setType('id', PARAM_INT);
                $mform->setConstants(array('id'=> $courseid));
index 69eeb7d11b649cb59528c059c16e2a8b73d0d2ef..1f587c3289feaf54b405cc057ad226c30eeb414c 100644 (file)
@@ -6,7 +6,7 @@
 
     require_once($CFG->dirroot.'/course/lib.php');
     require_once($CFG->dirroot.'/backup/restorelib.php');
-    
+
     $syscontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
 
     // if we're not a course creator , we can only import from our own courses.
@@ -15,9 +15,9 @@
     }
 
     $strimport = get_string("importdata");
+
     $tcourseids = '';
+
     if ($teachers = get_user_capability_course('moodle/course:update')) {
         foreach ($teachers as $teacher) {
             if ($teacher->id != $course->id && $teacher->id != SITEID){
         notify(get_string('courseimportnotaught'));
         return; // yay , this will pass control back to the file that included or required us.
     }
-    
+
     // quick forms
     include_once('import_form.php');
-        
-    $mform_post = new activities_import_form_1($CFG->wwwroot.'/course/import/activities/index.php', array('options'=>$options, 'courseid' => $course->id, 'text'=> get_string('coursestaught')));
+
+    $mform_post = new course_import_activities_form_1($CFG->wwwroot.'/course/import/activities/index.php', array('options'=>$options, 'courseid' => $course->id, 'text'=> get_string('coursestaught')));
     $mform_post ->display();
-    
-    unset($options); 
+
+    unset($options);
     $options = array();
-    
+
     foreach ($cat_courses as $ccourse) {
         if ($ccourse->id != $course->id && $ccourse->id != SITEID) {
             $options[$ccourse->id] = $ccourse->fullname;
         }
     }
     $cat = get_record("course_categories","id",$course->category);
-    
+
     if (count($options) > 0) {
-        $mform_post = new activities_import_form_1($CFG->wwwroot.'/course/import/activities/index.php', array('options'=>$options, 'courseid' => $course->id, 'text' => get_string('coursescategory')));
+        $mform_post = new course_import_activities_form_1($CFG->wwwroot.'/course/import/activities/index.php', array('options'=>$options, 'courseid' => $course->id, 'text' => get_string('coursescategory')));
         $mform_post ->display();
     }
 
     if (!empty($creator)) {
-        $mform_post = new activities_import_form_2($CFG->wwwroot.'/course/import/activities/index.php', array('courseid' => $course->id));
-        $mform_post ->display();     
+        $mform_post = new course_import_activities_form_2($CFG->wwwroot.'/course/import/activities/index.php', array('courseid' => $course->id));
+        $mform_post ->display();
     }
 
     if (!empty($fromcoursesearch) && !empty($creator)) {
index 9c607032ded309724c2a7134e1d1bd7185b30dff..02451f41c634afdd06c55fc1bde247f4685e7707 100755 (executable)
@@ -2,7 +2,7 @@
 
 require_once($CFG->libdir.'/formslib.php');
 
-class group_import_form extends moodleform {
+class course_import_groups_form extends moodleform {
 
        function definition() {
 
@@ -10,22 +10,22 @@ class group_import_form extends moodleform {
                $mform    =& $this->_form;
                $maxuploadsize = $this->_customdata['maxuploadsize'];
                $strimportgroups = get_string("importgroups");
-               
+
         $this->_upload_manager = new upload_manager('userfile', true, false, '', false, $maxuploadsize, true, true);
         $this->set_max_file_size('', $maxuploadsize);
-      
+
         $mform->addElement('header', 'general', '');//fill in the data depending on page params
-                                                    //later using set_defaults        
+                                                    //later using set_defaults
         // buttons
-        
+
         $mform->addElement('hidden', 'sesskey');
                $mform->setType('sesskey', PARAM_ALPHA);
                $mform->setConstants(array('sesskey'=> $USER->sesskey));
-               
+
                $mform->addElement('file', 'userfile', '');
-        $mform->setHelpButton('userfile', array('attachment', get_string('attachment', 'forum'), 'forum'));            
-               
-               
+        $mform->setHelpButton('userfile', array('attachment', get_string('attachment', 'forum'), 'forum'));
+
+
         $this->add_action_buttons(false, true, $strimportgroups);
 
        }
index ee960641ad130177107dd5126ffd8a5dcfb1e9aa..141a639a9b952d5146bc6f3f88f4f34622cf90ed 100644 (file)
     $maxuploadsize = get_max_upload_file_size();
     echo '<p align="center">';
     print_simple_box_start('center','80%');
-    
+
     // use formslib
     include_once('import_form.php');
-    $mform_post = new group_import_form($CFG->wwwroot.'/course/import/groups/index.php?id='.$id, array('maxuploadsize'=>$maxuploadsize));
+    $mform_post = new course_import_groups_form($CFG->wwwroot.'/course/import/groups/index.php?id='.$id, array('maxuploadsize'=>$maxuploadsize));
     $mform_post ->display();
-        
+
     print_simple_box_end();
-   
+
     echo '</p>';
-    
+
 ?>
index b4e7334f27b80a5244006329ca3814ddcf4cffd5..c1955f0537b0852ec4f83f5c4d8b9f3d3adc0d32 100644 (file)
         error("This module is missing important code! ($modlib)");
     }
 
-    $mformclassname=$module->name.'_mod_form';
+    $mformclassname = 'mod_'.$module->name.'_mod_form';
     $cousesection=isset($cw->section)?$cw->section:$section;
     $mform=& new $mformclassname($form->instance, $cousesection, ((isset($cm))?$cm:null));
     $mform->set_defaults($form);
index 02589c295dc43c810c207af2a63f291994513a14..79a4b21c24c24b0f35b5d3576766f11ca096cbd7 100644 (file)
@@ -15,7 +15,7 @@
         error(get_string('courserequestdisabled'));
     }
 
-    $requestform = new course_request_form('request.php');
+    $requestform = new course_request_form();
 
     $strtitle = get_string('courserequest');
     print_header($strtitle, $strtitle, $strtitle, $requestform->focus());
index a5a60c9b4adc248e650d7961f464d0cacedaa730..6cda255639716bf4c086e0d6d731582e6c8ee3ab 100755 (executable)
@@ -74,7 +74,7 @@ class enrolment_plugin_authorize
         }
         else {
             require_once($CFG->dirroot.'/enrol/authorize/enrol_form.php');
-            $frmenrol = new authorize_enrol_form('enrol.php');
+            $frmenrol = new enrol_authorize_form();
             if ($frmenrol->data_submitted()) {
                 $authorizeerror = '';
                 switch ($form->paymentmethod) {
index 9edc15dff8895f0ddcbab6b984f5a6282b5855bb..3b3c9cc126d79420cbc2637a66cffafd4c50b1b4 100755 (executable)
@@ -2,7 +2,7 @@
 
 require_once($CFG->libdir.'/formslib.php');
 
-class enrol_authorize_enrol_form extends moodleform
+class enrol_authorize_form extends moodleform
 {
     function definition()
     {
index 68246a3b536f8366fe73a0966f10caf3652c1a09..d4be25ca64124416ecb303088d393b4f0f5be415 100644 (file)
@@ -512,7 +512,7 @@ class moodleform {
         return $repeats;
     }
     /**
-     * Use this method to add the standard buttons to the end of your form. Pass a param of false
+     * Use this method to a cancel and submit button to the end of your form. Pass a param of false
      * if you don't want a cancel button in your form. If you have a cancel button make sure you
      * check for it being pressed using is_cancelled() and redirecting if it is true before trying to
      * get data with data_submitted().
@@ -521,21 +521,16 @@ class moodleform {
      * @param boolean $revert whether to show revert button, default true
      * @param string $submitlabel label for submit button, defaults to get_string('savechanges')
      */
-    function add_action_buttons($cancel = true, $revert = true, $submitlabel=null){
+    function add_action_buttons($cancel = true, $submitlabel=null){
         if (is_null($submitlabel)){
             $submitlabel = get_string('savechanges');
         }
         $mform =& $this->_form;
-        if ($revert || $cancel){
-            //when two or more elements we need a group
+        if ($cancel){
+            //when two elements we need a group
             $buttonarray=array();
             $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
-            if ($revert){
-                $buttonarray[] = &$mform->createElement('reset', 'resetbutton', get_string('revert'));
-            }
-            if ($cancel){
-                $buttonarray[] = &$mform->createElement('cancel');
-            }
+            $buttonarray[] = &$mform->createElement('cancel');
             $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
                $mform->closeHeaderBefore('buttonar');
         } else {
@@ -1134,7 +1129,7 @@ function validate_' . $this->_formName . '(frm) {
     function getLockOptionEndScript(){
         $js = '<script type="text/javascript" language="javascript">'."\n";
         $js .= '//<![CDATA['."\n";
-        $js .= "var ".$this->getAttribute('id')."items= {";
+        $js .= "var ".$this->_formName."items= {";
         foreach ($this->_dependencies as $dependentOn => $elements){
             $js .= "'$dependentOn'".' : {dependents :[';
             foreach ($elements as $element){
index cc4c7c25705e2c7fe6e28352d1bdfde7029e7d53..6094e1b4edc7e46e825d68beaa3172a66af4b328 100644 (file)
@@ -28,7 +28,7 @@
         error('Can not use this script when "Logged in as"!');
     }
 
-    $mform = new change_password_form('change_password.php');
+    $mform = new login_change_password_form();
     $mform->set_defaults(array('id'=>$course->id, 'username'=>$USER->username));
 
     if ($mform->is_cancelled()) {
index aed470673538f87dae9d52fbc7867b5c77e6aac4..c44191053828b995a5c20196e41f5f04de40ca95 100644 (file)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 // $Id$
 // forgot password routine.
 // find the user and call the appropriate routine for their authentication
@@ -53,10 +53,10 @@ if (!empty($CFG->changepassword)) {
        set_config('auth_'.$auth.'_changepasswordurl', $CFG->changepassword);
     }
     set_config('changepassword', '');
-}       
+}
 
 
-$mform = new forgot_password_form('forgot_password.php');
+$mform = new login_forgot_password_form();
 
 if ($mform->is_cancelled()) {
     redirect($CFG->httpswwwroot.'/login/index.php');
@@ -106,7 +106,7 @@ if ($action == 'find' and $param = $mform->data_submitted()) {
             $user = $mailuser;
         }
     }
-   
+
     // if user located (and no errors) take the appropriate action
     if (empty($errors) and !empty($user)) {
         // check this user isn't 'unconfirmed'
@@ -117,7 +117,7 @@ if ($action == 'find' and $param = $mform->data_submitted()) {
             $authmethod = $user->auth;
             if (is_internal_auth($authmethod) or !empty($CFG->{'auth_'.$authmethod.'_stdchangepassword'})) {
                 // handle internal authentication
-               
+
                 // set 'secret' string
                 $user->secret = random_string(15);
                 if (!set_field('user', 'secret', $user->secret, 'id', $user->id)) {
@@ -203,7 +203,7 @@ if ($action == 'find' and $param = $mform->data_submitted()) {
 
         reset_login_count();
         $page = 'emailsent';
-      
+
         $changepasswordurl = "{$CFG->httpswwwroot}/login/change_password.php";
         $a = new object();
         $a->email = $user->email;
index 2f0a1e9cc0767186620be2a38e512b03accd5388..a11a68d1109434614965623ea8fd2060d8d6212e 100644 (file)
@@ -11,7 +11,7 @@
         error("Sorry, you may not use this page.");
     }
 
-    $mform_signup = new login_signup_form('signup.php');
+    $mform_signup = new login_signup_form_1();
 
     if ($mform_signup->is_cancelled()) {
         redirect($CFG->httpswwwroot.'/login/index.php');
index 1d559fffe45e25787e4e61a8f6e8dee5ddb40484..074428a93b82aaace8a0a356e14f3b9048c9dbd4 100644 (file)
@@ -2,7 +2,7 @@
 
 require_once($CFG->libdir.'/formslib.php');
 
-class login_signup_form extends moodleform {
+class login_signup_form_1 extends moodleform {
        function definition() {
                global $USER, $CFG;
 
index 28178ade69e595e170dc8d9a11663ac9659f3617..08d5925d1a618bf526687d687674854f470985d5 100644 (file)
@@ -39,7 +39,7 @@ class assignment_online extends assignment_base {
         }
 
 /// prepare form and process submitted data
-        $mform = new assignment_online_edit_form('view.php');
+        $mform = new mod_assignment_online_edit_form();
 
         $defaults = new object();
         $defaults->id = $this->cm->id;
index 3c741c8ea93c1a81f03666f3ed157fcb721a420e..42eabe80b9f0b762562b8f5335bb816c0746a2f5 100644 (file)
@@ -437,7 +437,7 @@ class assignment_upload extends assignment_base {
 
         $returnurl = 'view.php?id='.$this->cm->id;
 
-        $mform = new assignment_upload_notes_form('upload.php');
+        $mform = new mod_assignment_upload_notes_form();
 
         $defaults = new object();
         $defaults->id = $this->cm->id;
index 191f120dc8415d862dcf2f1229f9cbfead86afdc..0735a2d02db5f14d0e1afea93e0d4483271a7f3e 100755 (executable)
@@ -46,7 +46,7 @@
     }
 
 
-    $mform = new data_comment_form('comment.php');
+    $mform = new mod_data_comment_form();
     $mform->set_defaults(array('mode'=>$mode, 'page'=>$page, 'rid'=>$record->id, 'commentid'=>$commentid));
     if ($comment) {
         $format = $comment->format;
index cf03d84368bbeb95f20ab5b1a6c9bca1c1fd6262..1d478d43b352a113f37bab0411596225896e55a3 100755 (executable)
@@ -889,12 +889,12 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re
             if ($template == 'singletemplate') {    //prints ratings options
                 data_print_ratings($data, $record);
             }
-    
+
             /**********************************
              *    Printing Ratings Form       *
              *********************************/
             if (($template == 'singletemplate') && ($data->comments)) {    //prints ratings options
-    
+
                 data_print_comments($data, $record, $page);
             }
         }
@@ -1112,7 +1112,7 @@ function data_print_comments($data, $record, $page=0, $mform=false) {
     } else {
         if (!$mform) {
             require_once('comment_form.php');
-            $mform = new data_comment_form('comment.php');
+            $mform = new mod_data_comment_form('comment.php');
             $mform->set_defaults(array('mode'=>'add', 'page'=>$page, 'rid'=>$record->id));
         }
         echo '<div class="newcomment" align="center">';
index 6b9aca8c0790fe9653894faf99c1a378d132d711..8e3b092f057059976242989afcd103d5a730227a 100644 (file)
     }
     $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
 
-    $mform_post = new forum_post_form('post.php', array('course'=>$course, 'coursecontext'=>$coursecontext, 'modcontext'=>$modcontext, 'forum'=>$forum, 'post'=>$post));
+    $mform_post = new mod_forum_post_form('post.php', array('course'=>$course, 'coursecontext'=>$coursecontext, 'modcontext'=>$modcontext, 'forum'=>$forum, 'post'=>$post));
 
     if ($fromform = $mform_post->data_submitted()) {
 
index 3fd7039b028b81269002563e4d43dbfad20c42e9..0a0cc181ad1dc99570d15ca852a6e04ee2e1d982 100644 (file)
@@ -51,7 +51,7 @@ function glossary_comment_add() {
         error('You can\'t add comments to this glossary!');
     }
 
-    $mform = new glossary_comment_form('comment.php');
+    $mform = new mod_glossary_comment_form();
     $mform->set_defaults(array('eid'=>$eid, 'action'=>'add'));
 
     if ($mform->is_cancelled()) {
@@ -174,7 +174,7 @@ function glossary_comment_edit() {
         error('You can\'t edit this. Time expired!');
     }
 
-    $mform = new glossary_comment_form('comment.php');
+    $mform = new mod_glossary_comment_form();
     trusttext_prepare_edit($comment->entrycomment, $comment->format, can_use_html_editor(), $context);
     $mform->set_defaults(array('cid'=>$cid, 'action'=>'edit', 'entrycomment'=>$comment->entrycomment, 'format'=>$comment->format));
 
index 05b7c05653c334013338b84142253ae56672a340..dc4070a74062324eaca316ee78a0e8f018f9bf44 100644 (file)
@@ -39,7 +39,7 @@ if ($e) { // if entry is specified
     require_capability('mod/glossary:write', $context);
 }
 
-$mform =& new glossary_entry_form(null, compact('cm', 'glossary', 'hook', 'mode', 'e', 'context'));
+$mform =& new mod_glossary_entry_form(null, compact('cm', 'glossary', 'hook', 'mode', 'e', 'context'));
 if ($mform->is_cancelled()){
     if ($e){
         redirect("view.php?id=$cm->id&amp;mode=entry&amp;hook=$e");
index 43289e076560986dcea4ce837459746270155873..ba0cecb55f353ba348a51bdf2094f1e11bfd66e2 100644 (file)
@@ -56,7 +56,7 @@
         if (!$lastform->name or !$lastform->template) {
             error(get_string("filloutallfields"), $_SERVER["HTTP_REFERER"]);
         }
-        $mform = new survey_details_form($CFG->wwwroot.'/course/mod.php',array('lastform'=>stripslashes_safe($lastform)));
+        $mform = new mod_survey_details_form($CFG->wwwroot.'/course/mod.php', array('lastform'=>stripslashes_safe($lastform)));
         $mform->display();
         print_footer($course);
 
index 6078f1e48a205af7171250d511c1c0dbcf20cd63..2e130655e4e8bd64a7a7a018d1e8aa40f5aee9b1 100644 (file)
  * class that inherits from this one, and implements the definition_inner()
  * method.
  */
-class edit_question_form extends moodleform {
+class question_edit_form extends moodleform {
     /**
      * Build the form definition.
-     * 
-     * This adds all the form files that the default question type supports. 
+     *
+     * This adds all the form files that the default question type supports.
      * If your question type does not support all these fields, then you can
      * override this method and remove the ones you don't want with $mform->removeElement().
      */
     function definition() {
         global $COURSE;
-        
+
         $qtype = $this->qtype();
         $langfile = "qtype_$qtype";
-        
+
         $mform =& $this->_form;
         $renderer =& $mform->defaultRenderer();
 
         // Standard fields at the start of the form.
         $mform->addElement('header', 'formheader', get_string("editing$qtype", $langfile));
         $mform->setHelpButton('formheader', array($qtype, get_string($qtype, $qtype), $qtype));
-        
+
         $mform->addElement('questioncategory', 'category', get_string('category', 'quiz'),
                 array('courseid' => $COURSE->id, 'published' => true, 'only_editable' => true));
-        
+
         $mform->addElement('text', 'name', get_string('questionname', 'quiz'),
                 array('size' => 50));
         $mform->setType('name', PARAM_MULTILANG);
         $mform->addRule('name', null, 'required', null, 'client');
-        
+
         $mform->addElement('htmleditor', 'questiontext', get_string('questiontext', 'quiz'),
                 array('rows' => 15, 'course' => $COURSE->id));
         $mform->setType('questiontext', PARAM_RAW);
@@ -56,7 +56,7 @@ class edit_question_form extends moodleform {
             $mform->addElement('select', 'image', get_string('imagedisplay', 'quiz'), $images);
             $mform->setType('image', PARAM_FILE);
         }
-  
+
         $mform->addElement('text', 'defaultgrade', get_string('defaultgrade', 'quiz'),
                 array('size' => 3));
         $mform->setType('defaultgrade', PARAM_INT);
@@ -72,7 +72,7 @@ class edit_question_form extends moodleform {
                 array('rows' => 10, 'course' => $COURSE->id));
         $mform->setType('generalfeedback', PARAM_RAW);
         $mform->setHelpButton('generalfeedback', array('generalfeedback', get_string('generalfeedback', 'quiz'), 'quiz'));
-  
+
         // Any questiontype specific fields.
         $this->definition_inner($mform);
 
@@ -99,22 +99,22 @@ class edit_question_form extends moodleform {
         $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
         $renderer->addStopFieldsetElements('buttonar');
     }
-    
+
     /**
      * Add any question-type specific form fields.
-     * 
-     * @param object $mform the form being built. 
+     *
+     * @param object $mform the form being built.
      */
     function definition_inner(&$mform) {
         // By default, do nothing.
     }
-    
+
     function set_defaults($question) {
         global $QTYPES;
         $QTYPES[$question->qtype]->set_default_options($question);
         parent::set_defaults($question);
     }
-        
+
     /**
      * Override this in the subclass to question type name.
      * @return the question type name, should be the same as the name() method in the question type class.