]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9742 - changed tabs to spaces in a few places where there are one
authorpoltawski <poltawski>
Tue, 8 May 2007 15:07:25 +0000 (15:07 +0000)
committerpoltawski <poltawski>
Tue, 8 May 2007 15:07:25 +0000 (15:07 +0000)
or two

24 files changed:
admin/pagelib.php
auth/shibboleth/README.txt
auth/shibboleth/auth.php
auth/shibboleth/index.php
blocks/moodleblock.class.php
blog/header.php
course/lib.php
course/search.php
enrol/authorize/db/upgrade.php
lib/db/access.php
lib/form/datetimeselector.php
lib/formslib.php
lib/moodlelib.php
lib/questionlib.php
lib/weblib.php
mod/choice/report.php
mod/forum/lib.php
mod/forum/post.php
mod/glossary/showentry.php
mod/resource/type/ims/deploy.php
mod/resource/type/ims/resource.class.php
mod/wiki/view.php
question/format/hotpot/format.php
question/format/webct/format.php

index ac87f0d1dd542d7afaaa8be238fa920ffc5e61ff..12095b6660fc91c1529475ecc8d4331bd4d96fc0 100644 (file)
@@ -116,18 +116,18 @@ class page_admin extends page_base {
         $this->init_full($section); // we're trusting that init_full() has already been called by now; it should have.
                                     // if not, print_header() has to be called with a $section parameter
 
-       // The search page currently doesn't handle block editing 
+        // The search page currently doesn't handle block editing 
         if ($this->section != 'search' and $this->user_allowed_editing()) {
             $buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
-                       '<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
-                       '<input type="hidden" name="section" value="'.$this->section.'" />'.
-                       '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
+                '<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
+                '<input type="hidden" name="section" value="'.$this->section.'" />'.
+                '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
         } else {
             $buttons = '&nbsp;';
         }
-        
+
         print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname, 
-                       implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, '');
+                     implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, '');
     }
 
     function get_type() {
index f64afa84ac35b54b765965653ec0a8a27603fec7..a353c482eafc864c06c794c84ba843658d5f5e22 100644 (file)
@@ -162,7 +162,7 @@ Example file:
         $result["country"] = $country;
         $result["department"] = $institution;
         $result["description"] = "I am a Shibboleth user";
-       
+
     }
 
 ?>
index 4af09ac9874417166b512a51d13dc20740456d5f..54c0265ca9c135513751076178a504dc5d4180f9 100644 (file)
@@ -148,9 +148,9 @@ class auth_plugin_shibboleth extends auth_plugin_base {
 
     function loginpage_hook() {
         global $SESSION, $CFG;
-       
-       // Prevent username from being shown on login page after logout
-       $CFG->nolastloggedin = true;
+
+        // Prevent username from being shown on login page after logout
+        $CFG->nolastloggedin = true;
 
         return;
     }
index 1750e00d51e3b08fb4e96ed733f794df88e7c1ec..9bda6c35d80cf7b6b455277c054a058af654d617 100644 (file)
@@ -44,7 +44,7 @@
             
             // Don't show username on login page
             set_moodle_cookie('nobody');
-           
+
             set_login_session_preferences();
             
             unset($SESSION->lang);
index a5d1169715536d8868517009d401b532c901507f..a9a32b946ad1117b0cbc38875d55325bf69b1139 100644 (file)
@@ -257,18 +257,18 @@ class block_base {
 
         //Accessibility: validation, can't have <div> inside <h2>, use <span>.
         $title = '<div class="title">';
-        
+
         if (!empty($CFG->allowuserblockhiding)) {
             //Accessibility: added static 'alt' text for the +- icon.
             //TODO (nfreear): language string 'hide OR show block'
             $title .= '<div class="hide-show">'.
-                                         '<a title="'.get_string('showhideblock','access').
-                                         '" href="#" onclick="elementToggleHide(this, true, function(el) {'.
-                                         'return findParentNode(el, \'DIV\', \'sideblock\'); '.
-                                         '}, \''.$CFG->pixpath.'\' ); return false;">'.
-                                         '<img src="'.$CFG->pixpath.'/spacer.gif" '.
-                                         'id = "togglehide_inst'.$this->instance->id.'" '.
-                                         'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
+                '<a title="'.get_string('showhideblock','access').
+                '" href="#" onclick="elementToggleHide(this, true, function(el) {'.
+                'return findParentNode(el, \'DIV\', \'sideblock\'); '.
+                '}, \''.$CFG->pixpath.'\' ); return false;">'.
+                '<img src="'.$CFG->pixpath.'/spacer.gif" '.
+                'id = "togglehide_inst'.$this->instance->id.'" '.
+                'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
         }
 
         //Accesssibility: added H2 (was in, weblib.php: print_side_block)
index 7301c11f3530109bfaed63d98596ccdab78a46c1..717618a4eb9eeed1f9f12252611747bc677f0154 100755 (executable)
@@ -134,14 +134,14 @@ if (!$course = get_record('course', 'id', $courseid)) {
         case 'group':
 
             if ($thisgroup = groups_get_group($filterselect, false)) { //TODO:
-               if ($tagid || !empty($tag)) {
-                       print_header("$course->shortname: $blogstring", $course->fullname,
-                            '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name.'</a> ->
-                            <a href="index.php?filtertype=group&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
-               } else {
-                       print_header("$course->shortname: $blogstring", $course->fullname,
-                            '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name."</a> ->
-                            $blogstring",'','',true,$PAGE->get_extra_header_string());
+                if ($tagid || !empty($tag)) {
+                    print_header("$course->shortname: $blogstring", $course->fullname,
+                        '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name.'</a> ->
+                        <a href="index.php?filtertype=group&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
+                } else {
+                    print_header("$course->shortname: $blogstring", $course->fullname,
+                        '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name."</a> ->
+                        $blogstring",'','',true,$PAGE->get_extra_header_string());
                 }
             } else {
                 print_error('Unable to find group');
index 433f6f45013cfd3ae764f27c9863f11e23331680..71d64dc9da93fd04163f2ba5976084ac81b2a5b8 100644 (file)
@@ -2542,7 +2542,7 @@ function get_section_name($format) {
     if($sectionname == "[[name$format]]") {
         $sectionname = get_string("name$format");
     }
-       return $sectionname;
+    return $sectionname;
 }
 
 /**
index b8a901599b505b0dbf46363fceda6f699f7e168b..500721dd9af04f93db0927af8c03b1c89e20cd3d 100644 (file)
             echo "<th scope=\"col\">$strcategory</th>\n";
             echo "<th scope=\"col\">$strselect</th>\n";
             echo "<th scope=\"col\">$stredit</th></tr>\n";
-            foreach ($courses as $course) {                        
-                
+            foreach ($courses as $course) {
+
                 $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
 
                 $course->fullname = highlight("$search", $course->fullname);
                 }
 
                 // checks whether user can do role assignment
-                   if (has_capability('moodle/role:assign', $coursecontext)) {
+                if (has_capability('moodle/role:assign', $coursecontext)) {
                     echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">';
-                       echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
-                   }                
+                    echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
+                }                
 
                 // checks whether user can delete course
                 if (has_capability('moodle/course:delete', $coursecontext)) {  
index 5a4ec888312cadd07f139853d166482321f737dc..c28da08f87543086f24d871bc8ddb4be17309815 100644 (file)
@@ -35,23 +35,23 @@ function xmldb_enrol_authorize_upgrade($oldversion=0) {
     if ($result && $oldversion < 2006112900) {
         if (isset($CFG->an_login)) {
             if (empty($CFG->an_login)) {
-               unset_config('an_login');
+                unset_config('an_login');
             }
             else {
-               $result = $result && set_config('an_login', rc4encrypt($CFG->an_login), 'enrol/authorize') && unset_config('an_login');
+                $result = $result && set_config('an_login', rc4encrypt($CFG->an_login), 'enrol/authorize') && unset_config('an_login');
             }
         }
         if (isset($CFG->an_tran_key)) {
             if (empty($CFG->an_tran_key)) {
-               unset_config('an_tran_key');
+                unset_config('an_tran_key');
             }
             else {
-               $result = $result && set_config('an_tran_key', rc4encrypt($CFG->an_tran_key), 'enrol/authorize') && unset_config('an_tran_key');
+                $result = $result && set_config('an_tran_key', rc4encrypt($CFG->an_tran_key), 'enrol/authorize') && unset_config('an_tran_key');
             }
         }
         if (isset($CFG->an_password)) {
             if (empty($CFG->an_password)) {
-               unset_config('an_password');
+                unset_config('an_password');
             }
             else {
                 $result = $result && set_config('an_password', rc4encrypt($CFG->an_password), 'enrol/authorize') && unset_config('an_password');
index a2104d5cd551f0230d3c872fef981ef71f34128d..77c29cc72afb34fcbe16d10c130ce793e2f9227b 100644 (file)
@@ -714,17 +714,17 @@ $moodle_capabilities = array(
             'admin' => CAP_ALLOW
         )
     ),
-    
-    'moodle/user:editprofile' => array(         
-                
-           'riskbitmask' => RISK_SPAM,          
-                
-           'captype' => 'write',        
-           'contextlevel' => CONTEXT_USER,      
-           'legacy' => array(   
-              'admin' => CAP_ALLOW      
-           )    
-       ),
+
+    'moodle/user:editprofile' => array(
+
+        'riskbitmask' => RISK_SPAM,
+
+        'captype' => 'write',
+        'contextlevel' => CONTEXT_USER,
+        'legacy' => array(
+            'admin' => CAP_ALLOW
+        )
+    ),
 
     'moodle/user:editownprofile' => array(      
 
index 49e5e06562026023bf9bcfd1ca9701637582258d..03220929d2a0973b465793198a72ade335cb5d96 100644 (file)
@@ -134,8 +134,8 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
                 if (!is_array($value)) {
                     $currentdate = usergetdate($value);
                     $value = array(
-                               'minute' => $currentdate['minutes'],
-                               'hour' => $currentdate['hours'],
+                        'minute' => $currentdate['minutes'],
+                        'hour' => $currentdate['hours'],
                         'day' => $currentdate['mday'],
                         'month' => $currentdate['mon'],
                         'year' => $currentdate['year']);
index fc7e7873fbf3b4dc49ed4c97d304ce60442af979..dd0cd6ae860e198810058d4f94e3dd0e3a2fdbed 100644 (file)
@@ -545,11 +545,11 @@ class moodleform {
             $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
             $buttonarray[] = &$mform->createElement('cancel');
             $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
-               $mform->closeHeaderBefore('buttonar');
+            $mform->closeHeaderBefore('buttonar');
         } else {
             //no group needed
             $mform->addElement('submit', 'submitbutton', $submitlabel);
-               $mform->closeHeaderBefore('submitbutton');
+            $mform->closeHeaderBefore('submitbutton');
         }
     }
 }
index 42ee75403b3201ff35a73cbf59ee04bf1ad8a773..adac35640180e43bb720100ce616856a66171774 100644 (file)
@@ -2715,7 +2715,7 @@ function validate_internal_user_password(&$user, $password) {
 
     $validated = false;
 
-       // get password original encoding in case it was not updated to unicode yet
+    // get password original encoding in case it was not updated to unicode yet
     $textlib = textlib_get_instance();
     $convpassword = $textlib->convert($password, 'utf-8', get_string('oldcharset'));
 
index 2a4f19352f70000b28c3702770df4ddee433dc02..a584b732b75c28c9beaeeccedff7af10aef377f4 100644 (file)
@@ -554,22 +554,22 @@ function question_delete_course($course, $feedback=true) {
     return true;
 }
 
-function questionbank_navigation_tabs(&$row, $context, $courseid) {
+function questionbank_navigation_tabs(&$row, $context, $querystring) {
     global $CFG;
     if (has_capability('moodle/question:manage', $context)) {
-        $row[] = new tabobject('questions', "$CFG->wwwroot/question/edit.php?courseid=$courseid", get_string('questions', 'quiz'), get_string('editquestions', "quiz"));
+        $row[] = new tabobject('questions', "$CFG->wwwroot/question/edit.php?$querystring", get_string('questions', 'quiz'), get_string('editquestions', "quiz"));
     }
     
     if (has_capability('moodle/question:managecategory', $context)) {
-        $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?courseid=$courseid", get_string('categories', 'quiz'), get_string('editqcats', 'quiz'));
+        $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?$querystring", get_string('categories', 'quiz'), get_string('editqcats', 'quiz'));
     }
     
     if (has_capability('moodle/question:import', $context)) {
-        $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?courseid=$courseid", get_string('import', 'quiz'), get_string('importquestions', 'quiz'));
+        $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?$querystring", get_string('import', 'quiz'), get_string('importquestions', 'quiz'));
     }
     
     if (has_capability('moodle/question:export', $context)) {
-        $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?courseid=$courseid", get_string('export', 'quiz'), get_string('exportquestions', 'quiz'));
+        $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?$querystring", get_string('export', 'quiz'), get_string('exportquestions', 'quiz'));
     }
 }
 
@@ -1742,7 +1742,7 @@ function question_categorylist($categoryid) {
  * @return mixed category object or null if fails
  */
 function create_category_path( $catpath, $delimiter='/', $courseid=0 ) {
-       $catpath = clean_param( $catpath,PARAM_PATH );
+    $catpath = clean_param( $catpath,PARAM_PATH );
     $catnames = explode( $delimiter, $catpath );
     $parent = 0;
     $category = null;
index bde9151aa8e337e03c16fbff0d0e5bdab6fc1679..d5c542e144258339d5a9604eac65fdef2771fe19 100644 (file)
@@ -4089,11 +4089,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
     }
     $str .= '</textarea>'."\n";
 
-       if ($usehtmleditor) {
+    if ($usehtmleditor) {
         // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556)
-               $str .= '<script type="text/javascript">document.write(\''.
+        $str .= '<script type="text/javascript">document.write(\''.
             str_replace('\'','\\\'',editorshortcutshelpbutton()).'\'); </script>';
-       }
+    }
 
     if ($return) {
         return $str;
@@ -5132,7 +5132,7 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext=
             $linkobject .= $imagetext;
         } else {
             $linkobject .= '<img class="iconhelp" alt="'.s(strip_tags($tooltip)).'" src="'.
-                       $CFG->pixpath .'/help.gif" />';
+                $CFG->pixpath .'/help.gif" />';
         }
     } else {
         $linkobject .= $tooltip;
@@ -5193,7 +5193,7 @@ function editorshortcutshelpbutton() {
 
     global $CFG;
     $imagetext = '<img src="' . $CFG->httpswwwroot . '/lib/editor/htmlarea/images/kbhelp.gif" alt="'.
-                                       get_string('editorshortcutkeys').'" class="iconkbhelp" />';
+        get_string('editorshortcutkeys').'" class="iconkbhelp" />';
 
     return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext);
 }
index 48e9e5dc4ff20752b1a5a864afd313e6b9568222..285bc3d92f19ba40aa3f81c1f47b6f4c74e97897 100644 (file)
@@ -39,7 +39,7 @@
     }
         
     if ($download <> "xls" and $download <> "txt" and $download <> "ods") {
-       
+
         $crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
         $crumbs[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
         $crumbs[] = array('name' => $strresponses, 'link' => '', 'type' => 'title');
index 35748cdd24176bfc5ab69f568d8c09b377b671a2..d0b05e3f1643a1bb5ef9324975c4b3f1f6ddc139 100644 (file)
@@ -1877,10 +1877,10 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) {
                                AND u.deleted <> 1  $groupselect
                           ORDER BY u.email ASC");
     }
-       // Guest user should never be subscribed to a forum.
-       if ($guest = guest_user()) {
-               unset($results[$guest->id]);
-       }
+    // Guest user should never be subscribed to a forum.
+    if ($guest = guest_user()) {
+        unset($results[$guest->id]);
+    }
 
     if ($cache) {
         $resultscache[$forum->id][$groupid] = $results;
index 286c330f7223fa5cfcb33452191c1805beaae9c4..d36759dba9cb175db18dbaf6d1de2ecad8e77eee 100644 (file)
         }
 
         $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
-               $modcontext = get_context_instance(CONTEXT_MODULE, $forum->id);
+        $modcontext = get_context_instance(CONTEXT_MODULE, $forum->id);
 
         if (! forum_user_can_post($forum)) {
             if (has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) {  // User is a guest here!
             if (groupmode($course, $cm)) {   // Make sure user can post here
                 $mygroupid = mygroupid($course->id);
                 if (!((empty($mygroupid) and $discussion->groupid == -1)
-                                               || (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/)
-                                               || has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {
+                        || (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/)
+                        || has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {
                     print_error('nopostdiscussion', 'forum');
                 }
             }
index 6ab55129737cc3c7be89e1cf32c56c9a83a96c8d..d3602beccb6d804511d38aae21352fe7e9263e4b 100644 (file)
@@ -49,7 +49,7 @@
 
         $CFG->framename = "newwindow";
         if ($course->id != SITEID) {
-               $crumbs[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity');
+            $crumbs[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity');
             $crumbs[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
             
             $navigation = build_navigation($crumbs);
index 96072862e917832de03b10e5bbc39464a1a90fbf..c3895e3cdda7917c07f4266cbbf022c10cdffdd8 100644 (file)
@@ -63,7 +63,7 @@
     if ($inpopup) {
         print_header($pagetitle, $course->fullname);
     } else {
-       
+
         $resource_obj->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
         $resource_obj->crumbs[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action');
         $navigation = build_navigation($resource_obj->crumbs);
index 930fb37505bb68764fbba0d5076dd11d67aa8fd5..d063cd740c6dbbe95ee704a88a3f863465c65b5c 100644 (file)
@@ -371,7 +371,7 @@ class resource_ims extends resource_base {
             if ($inpopup) {
                 print_header($pagetitle, $course->fullname.' : '.$resource->name);
             } else {
-               
+
                 $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
                 $this->navigation = build_navigation($this->crumbs);
                  
@@ -473,7 +473,7 @@ class resource_ims extends resource_base {
                 //print_header($pagetitle, $course->fullname.' : '.$resource->name);
                 print_header();
             } else {
-               $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
+                $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
                 $this->navigation = build_navigation($this->crumbs);
                 print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
             }
index ed09038a740aea5722c42529751ace8c88544010..cbf94dd003a7afb9b5aa6dba516951ab7d568adf 100644 (file)
@@ -29,7 +29,7 @@
         if(count($actions)==2) {
             $pagename=$actions[1];
         } else {
-                   $pagename=$actions[0];
+            $pagename=$actions[0];
         }
     } else {
         $actions=array('');
 ";
             }
         } else {
-                       // OK, the page is now locked to us. Put in the AJAX for keeping the lock
+            // OK, the page is now locked to us. Put in the AJAX for keeping the lock
             $strlockcancelled=get_string('lockcancelled','wiki');
             $strnojslockwarning=get_string('nojslockwarning','wiki');
             $intervalms=WIKI_LOCK_RECONFIRM*1000;
index f13774a573fd4a39b3dc78b32d139e83f16d0d35..b08f0218a810936b728f3079e731f81f136dc12f 100644 (file)
@@ -488,7 +488,7 @@ class qformat_hotpot extends qformat_default {
         return $this->hotpot_prepare_str($str);
     }
     function hotpot_prepare_str($str) {
-               // convert html entities to unicode and add slashes
+        // convert html entities to unicode and add slashes
         $str = preg_replace('/&#[x0-9A-F]+;/ie', "html_entity_decode('\\0',ENT_NOQUOTES,'UTF-8')", $str);
         return addslashes($str);
     }
index 21e63f7c1fca3d52f5b1e18c8ea41ad1648a1e11..af0f591ab0921fa5a46246930896db5213a6a671 100644 (file)
@@ -517,11 +517,11 @@ class qformat_webct extends qformat_default {
                         qformat_webct_convert_formula($webct_options[1]);
 
                 // Default settings:
-                                                               $question->fraction[$currentchoice] = 1.0;
-                                                               $question->tolerance[$currentchoice] = 0.0;
-                                                               $question->tolerancetype[$currentchoice] = 2; // nominal (units in webct)
-                                                               $question->feedback[$currentchoice] = '';
-                                                               $question->correctanswerlength[$currentchoice] = 4;
+                $question->fraction[$currentchoice] = 1.0;
+                $question->tolerance[$currentchoice] = 0.0;
+                $question->tolerancetype[$currentchoice] = 2; // nominal (units in webct)
+                $question->feedback[$currentchoice] = '';
+                $question->correctanswerlength[$currentchoice] = 4;
 
                 $datasetnames = $QTYPES[CALCULATED]->find_dataset_names($webct_options[1]);
                 foreach ($datasetnames as $datasetname) {