Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/question/type/calculated/db/simpletest/testupgradelibnewqe.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00028 defined('MOODLE_INTERNAL') || die();
00029 
00030 require_once($CFG->dirroot . '/question/engine/upgrade/simpletest/helper.php');
00031 
00032 
00039 class qtype_calculated_attempt_upgrader_test extends question_attempt_upgrader_test_base {
00040     public function test_calculated_adaptive_qsession97() {
00041         $quiz = (object) array(
00042             'id' => '4',
00043             'course' => '2',
00044             'name' => 'Calculated quiz',
00045             'intro' => '',
00046             'introformat' => '1',
00047             'timeopen' => '0',
00048             'timeclose' => '0',
00049             'attempts' => '0',
00050             'attemptonlast' => '0',
00051             'grademethod' => '1',
00052             'decimalpoints' => '2',
00053             'questiondecimalpoints' => '-1',
00054             'questionsperpage' => '1',
00055             'shufflequestions' => '0',
00056             'shuffleanswers' => '1',
00057             'questions' => '16,0,17,0,18,0',
00058             'sumgrades' => '3.00000',
00059             'grade' => '10.00000',
00060             'timecreated' => '0',
00061             'timemodified' => '1305648351',
00062             'timelimit' => '0',
00063             'password' => '',
00064             'subnet' => '',
00065             'popup' => '0',
00066             'delay1' => '0',
00067             'delay2' => '0',
00068             'showuserpicture' => '0',
00069             'showblocks' => '0',
00070             'preferredbehaviour' => 'adaptive',
00071             'reviewattempt' => '69888',
00072             'reviewcorrectness' => '69888',
00073             'reviewmarks' => '69888',
00074             'reviewspecificfeedback' => '69888',
00075             'reviewgeneralfeedback' => '69888',
00076             'reviewrightanswer' => '69888',
00077             'reviewoverallfeedback' => '4352',
00078         );
00079         $attempt = (object) array(
00080             'id' => '13',
00081             'uniqueid' => '13',
00082             'quiz' => '4',
00083             'userid' => '4',
00084             'attempt' => '1',
00085             'sumgrades' => '0.00000',
00086             'timestart' => '1305830650',
00087             'timefinish' => '1305830656',
00088             'timemodified' => '1305830656',
00089             'layout' => '16,0,17,0,18,0',
00090             'preview' => '0',
00091             'needsupgradetonewqe' => 1,
00092         );
00093         $question = (object) array(
00094             'id' => '18',
00095             'category' => '2',
00096             'parent' => '0',
00097             'name' => 'Calculated',
00098             'questiontext' => '<p>What is {a} m + {b} m?</p><p>_______________</p><p>Remember to type a unit.</p>',
00099             'questiontextformat' => '1',
00100             'generalfeedback' => '',
00101             'generalfeedbackformat' => '1',
00102             'defaultmark' => '1.0000000',
00103             'penalty' => '0.1',
00104             'qtype' => 'calculated',
00105             'length' => '1',
00106             'stamp' => 'tjh238.vledev2.open.ac.uk+110519184316+ELvZeg',
00107             'version' => 'tjh238.vledev2.open.ac.uk+110519184317+exx1Bm',
00108             'hidden' => '0',
00109             'timecreated' => '1305830596',
00110             'timemodified' => '1305830596',
00111             'createdby' => '2',
00112             'modifiedby' => '2',
00113             'maxmark' => '1.0000000',
00114             'options' => (object) array(
00115                 'id' => '2',
00116                 'question' => '18',
00117                 'synchronize' => '0',
00118                 'single' => '0',
00119                 'shuffleanswers' => '1',
00120                 'correctfeedback' => '',
00121                 'correctfeedbackformat' => '0',
00122                 'partiallycorrectfeedback' => '',
00123                 'partiallycorrectfeedbackformat' => '0',
00124                 'incorrectfeedback' => '',
00125                 'incorrectfeedbackformat' => '0',
00126                 'answernumbering' => 'abc',
00127                 'shownumcorrect' => '0',
00128                 'answers' => array(
00129                     28 => (object) array(
00130                         'id' => '28',
00131                         'question' => '18',
00132                         'answer' => '{a} + {b}',
00133                         'answerformat' => '0',
00134                         'fraction' => '1.0000000',
00135                         'feedback' => '',
00136                         'feedbackformat' => '1',
00137                         'tolerance' => '0.01',
00138                         'tolerancetype' => '1',
00139                         'correctanswerlength' => '2',
00140                         'correctanswerformat' => '1',
00141                     ),
00142                 ),
00143                 'units' => array(
00144                     0 => (object) array(
00145                         'id' => '9',
00146                         'question' => '18',
00147                         'multiplier' => 1,
00148                         'unit' => 'm',
00149                     ),
00150                 ),
00151                 'unitgradingtype' => '1',
00152                 'unitpenalty' => '0.5000000',
00153                 'showunits' => '0',
00154                 'unitsleft' => '0',
00155             ),
00156             'hints' => array(
00157             ),
00158         );
00159         $qsession = (object) array(
00160             'id' => '97',
00161             'attemptid' => '13',
00162             'questionid' => '18',
00163             'newest' => '258',
00164             'newgraded' => '258',
00165             'sumpenalty' => '0.1000000',
00166             'manualcomment' => '',
00167             'manualcommentformat' => '1',
00168             'flagged' => '0',
00169         );
00170         $qstates = array(
00171             255 => (object) array(
00172                 'id' => '255',
00173                 'attempt' => '13',
00174                 'question' => '18',
00175                 'seq_number' => '0',
00176                 'answer' => 'dataset10-|||||',
00177                 'timestamp' => '1305830650',
00178                 'event' => '0',
00179                 'grade' => '0.0000000',
00180                 'raw_grade' => '0.0000000',
00181                 'penalty' => '0.0000000',
00182             ),
00183             258 => (object) array(
00184                 'id' => '258',
00185                 'attempt' => '13',
00186                 'question' => '18',
00187                 'seq_number' => '1',
00188                 'answer' => 'dataset10-|||||',
00189                 'timestamp' => '1305830650',
00190                 'event' => '6',
00191                 'grade' => '0.0000000',
00192                 'raw_grade' => '0.0000000',
00193                 'penalty' => '0.1000000',
00194             ),
00195         );
00196         $this->loader->put_dataset_in_cache($question->id, 10, array('a' => '7.5', 'b' => '4.9'));
00197 
00198         $qa = $this->updater->convert_question_attempt($quiz, $attempt, $question, $qsession, $qstates);
00199 
00200         $expectedqa = (object) array(
00201             'behaviour' => 'adaptive',
00202             'questionid' => 18,
00203             'variant' => 10,
00204             'maxmark' => 1.0000000,
00205             'minfraction' => 0,
00206             'flagged' => 0,
00207             'questionsummary' => 'What is 7.5 m + 4.9 m?
00208 
00209 _______________
00210 
00211 Remember to type a unit.',
00212             'rightanswer' => '12.4 m',
00213             'responsesummary' => '',
00214             'timemodified' => 1305830650,
00215             'steps' => array(
00216                 0 => (object) array(
00217                     'sequencenumber' => 0,
00218                     'state' => 'todo',
00219                     'fraction' => null,
00220                     'timecreated' => 1305830650,
00221                     'userid' => 4,
00222                     'data' => array('_separators' => '.$,',
00223                             '_var_a' => '7.5', '_var_b' => '4.9'),
00224                 ),
00225                 1 => (object) array(
00226                     'sequencenumber' => 1,
00227                     'state' => 'gradedwrong',
00228                     'fraction' => null,
00229                     'timecreated' => 1305830650,
00230                     'userid' => 4,
00231                     'data' => array('answer' => '', '-finish' => 1, '-_try' => 1, '-_rawfraction' => 0),
00232                 ),
00233             ),
00234         );
00235 
00236         $this->compare_qas($expectedqa, $qa);
00237     }
00238 
00239     public function test_calculated_adaptive_qsession100() {
00240         $quiz = (object) array(
00241             'id' => '4',
00242             'course' => '2',
00243             'name' => 'Calculated quiz',
00244             'intro' => '',
00245             'introformat' => '1',
00246             'timeopen' => '0',
00247             'timeclose' => '0',
00248             'attempts' => '0',
00249             'attemptonlast' => '0',
00250             'grademethod' => '1',
00251             'decimalpoints' => '2',
00252             'questiondecimalpoints' => '-1',
00253             'questionsperpage' => '1',
00254             'shufflequestions' => '0',
00255             'shuffleanswers' => '1',
00256             'questions' => '16,0,17,0,18,0',
00257             'sumgrades' => '3.00000',
00258             'grade' => '10.00000',
00259             'timecreated' => '0',
00260             'timemodified' => '1305648351',
00261             'timelimit' => '0',
00262             'password' => '',
00263             'subnet' => '',
00264             'popup' => '0',
00265             'delay1' => '0',
00266             'delay2' => '0',
00267             'showuserpicture' => '0',
00268             'showblocks' => '0',
00269             'preferredbehaviour' => 'adaptive',
00270             'reviewattempt' => '69888',
00271             'reviewcorrectness' => '69888',
00272             'reviewmarks' => '69888',
00273             'reviewspecificfeedback' => '69888',
00274             'reviewgeneralfeedback' => '69888',
00275             'reviewrightanswer' => '69888',
00276             'reviewoverallfeedback' => '4352',
00277         );
00278         $attempt = (object) array(
00279             'id' => '14',
00280             'uniqueid' => '14',
00281             'quiz' => '4',
00282             'userid' => '4',
00283             'attempt' => '2',
00284             'sumgrades' => '2.80000',
00285             'timestart' => '1305830661',
00286             'timefinish' => '1305830729',
00287             'timemodified' => '1305830729',
00288             'layout' => '16,0,17,0,18,0',
00289             'preview' => '0',
00290             'needsupgradetonewqe' => 1,
00291         );
00292         $question = (object) array(
00293             'id' => '18',
00294             'category' => '2',
00295             'parent' => '0',
00296             'name' => 'Calculated',
00297             'questiontext' => '<p>What is {a} m + {b} m?</p><p>_______________</p><p>Remember to type a unit.</p>',
00298             'questiontextformat' => '1',
00299             'generalfeedback' => '',
00300             'generalfeedbackformat' => '1',
00301             'defaultmark' => '1.0000000',
00302             'penalty' => '0.1',
00303             'qtype' => 'calculated',
00304             'length' => '1',
00305             'stamp' => 'tjh238.vledev2.open.ac.uk+110519184316+ELvZeg',
00306             'version' => 'tjh238.vledev2.open.ac.uk+110519184317+exx1Bm',
00307             'hidden' => '0',
00308             'timecreated' => '1305830596',
00309             'timemodified' => '1305830596',
00310             'createdby' => '2',
00311             'modifiedby' => '2',
00312             'maxmark' => '1.0000000',
00313             'options' => (object) array(
00314                 'id' => '2',
00315                 'question' => '18',
00316                 'synchronize' => '0',
00317                 'single' => '0',
00318                 'shuffleanswers' => '1',
00319                 'correctfeedback' => '',
00320                 'correctfeedbackformat' => '0',
00321                 'partiallycorrectfeedback' => '',
00322                 'partiallycorrectfeedbackformat' => '0',
00323                 'incorrectfeedback' => '',
00324                 'incorrectfeedbackformat' => '0',
00325                 'answernumbering' => 'abc',
00326                 'shownumcorrect' => '0',
00327                 'answers' => array(
00328                     28 => (object) array(
00329                         'id' => '28',
00330                         'question' => '18',
00331                         'answer' => '{a} + {b}',
00332                         'answerformat' => '0',
00333                         'fraction' => '1.0000000',
00334                         'feedback' => '',
00335                         'feedbackformat' => '1',
00336                         'tolerance' => '0.01',
00337                         'tolerancetype' => '1',
00338                         'correctanswerlength' => '2',
00339                         'correctanswerformat' => '1',
00340                     ),
00341                 ),
00342                 'units' => array(
00343                     0 => (object) array(
00344                         'id' => '9',
00345                         'question' => '18',
00346                         'multiplier' => 1,
00347                         'unit' => 'm',
00348                     ),
00349                 ),
00350                 'unitgradingtype' => '1',
00351                 'unitpenalty' => '0.5000000',
00352                 'showunits' => '0',
00353                 'unitsleft' => '0',
00354             ),
00355             'hints' => array(
00356             ),
00357         );
00358         $qsession = (object) array(
00359             'id' => '100',
00360             'attemptid' => '14',
00361             'questionid' => '18',
00362             'newest' => '269',
00363             'newgraded' => '269',
00364             'sumpenalty' => '0.3000000',
00365             'manualcomment' => '',
00366             'manualcommentformat' => '1',
00367             'flagged' => '0',
00368         );
00369         $qstates = array(
00370             261 => (object) array(
00371                 'id' => '261',
00372                 'attempt' => '14',
00373                 'question' => '18',
00374                 'seq_number' => '0',
00375                 'answer' => 'dataset11-|||||',
00376                 'timestamp' => '1305830661',
00377                 'event' => '0',
00378                 'grade' => '0.0000000',
00379                 'raw_grade' => '0.0000000',
00380                 'penalty' => '0.0000000',
00381             ),
00382             265 => (object) array(
00383                 'id' => '265',
00384                 'attempt' => '14',
00385                 'question' => '18',
00386                 'seq_number' => '1',
00387                 'answer' => 'dataset11-9.6|||||',
00388                 'timestamp' => '1305830714',
00389                 'event' => '3',
00390                 'grade' => '0.5000000',
00391                 'raw_grade' => '0.5000000',
00392                 'penalty' => '0.1000000',
00393             ),
00394             266 => (object) array(
00395                 'id' => '266',
00396                 'attempt' => '14',
00397                 'question' => '18',
00398                 'seq_number' => '2',
00399                 'answer' => 'dataset11-9.6|||||m',
00400                 'timestamp' => '1305830722',
00401                 'event' => '3',
00402                 'grade' => '0.9000000',
00403                 'raw_grade' => '1.0000000',
00404                 'penalty' => '0.1000000',
00405             ),
00406             269 => (object) array(
00407                 'id' => '269',
00408                 'attempt' => '14',
00409                 'question' => '18',
00410                 'seq_number' => '3',
00411                 'answer' => 'dataset11-9.6|||||m',
00412                 'timestamp' => '1305830722',
00413                 'event' => '6',
00414                 'grade' => '0.9000000',
00415                 'raw_grade' => '1.0000000',
00416                 'penalty' => '0.1000000',
00417             ),
00418         );
00419         $this->loader->put_dataset_in_cache($question->id, 11, array('a' => '5.1', 'b' => '4.5'));
00420 
00421         $qa = $this->updater->convert_question_attempt($quiz, $attempt, $question, $qsession, $qstates);
00422 
00423         $expectedqa = (object) array(
00424             'behaviour' => 'adaptive',
00425             'questionid' => 18,
00426             'variant' => 11,
00427             'maxmark' => 1.0000000,
00428             'minfraction' => 0,
00429             'flagged' => 0,
00430             'questionsummary' => 'What is 5.1 m + 4.5 m?
00431 
00432 _______________
00433 
00434 Remember to type a unit.',
00435             'rightanswer' => '9.6 m',
00436             'responsesummary' => '9.6 m',
00437             'timemodified' => 1305830722,
00438             'steps' => array(
00439                 0 => (object) array(
00440                     'sequencenumber' => 0,
00441                     'state' => 'todo',
00442                     'fraction' => null,
00443                     'timecreated' => 1305830661,
00444                     'userid' => 4,
00445                     'data' => array('_separators' => '.$,',
00446                             '_var_a' => '5.1', '_var_b' => '4.5'),
00447                 ),
00448                 1 => (object) array(
00449                     'sequencenumber' => 1,
00450                     'state' => 'todo',
00451                     'fraction' => 0.5,
00452                     'timecreated' => 1305830714,
00453                     'userid' => 4,
00454                     'data' => array('answer' => 9.6, '-_try' => 1,
00455                             '-_rawfraction' => 0.5, '-submit' => 1),
00456                 ),
00457                 2 => (object) array(
00458                     'sequencenumber' => 2,
00459                     'state' => 'todo',
00460                     'fraction' => 0.9,
00461                     'timecreated' => 1305830722,
00462                     'userid' => 4,
00463                     'data' => array('answer' => '9.6 m', '-_try' => 2,
00464                             '-_rawfraction' => 1, '-submit' => 1),
00465                 ),
00466                 3 => (object) array(
00467                     'sequencenumber' => 3,
00468                     'state' => 'gradedright',
00469                     'fraction' => 0.9,
00470                     'timecreated' => 1305830722,
00471                     'userid' => 4,
00472                     'data' => array('answer' => '9.6 m', '-_try' => 2,
00473                             '-_rawfraction' => 1, '-finish' => 1),
00474                 ),
00475             ),
00476         );
00477 
00478         $this->compare_qas($expectedqa, $qa);
00479     }
00480 
00481     public function test_calculated_adaptive_qsession103() {
00482         $quiz = (object) array(
00483             'id' => '4',
00484             'course' => '2',
00485             'name' => 'Calculated quiz',
00486             'intro' => '',
00487             'introformat' => '1',
00488             'timeopen' => '0',
00489             'timeclose' => '0',
00490             'attempts' => '0',
00491             'attemptonlast' => '0',
00492             'grademethod' => '1',
00493             'decimalpoints' => '2',
00494             'questiondecimalpoints' => '-1',
00495             'questionsperpage' => '1',
00496             'shufflequestions' => '0',
00497             'shuffleanswers' => '1',
00498             'questions' => '16,0,17,0,18,0',
00499             'sumgrades' => '3.00000',
00500             'grade' => '10.00000',
00501             'timecreated' => '0',
00502             'timemodified' => '1305648351',
00503             'timelimit' => '0',
00504             'password' => '',
00505             'subnet' => '',
00506             'popup' => '0',
00507             'delay1' => '0',
00508             'delay2' => '0',
00509             'showuserpicture' => '0',
00510             'showblocks' => '0',
00511             'preferredbehaviour' => 'adaptive',
00512             'reviewattempt' => '69888',
00513             'reviewcorrectness' => '69888',
00514             'reviewmarks' => '69888',
00515             'reviewspecificfeedback' => '69888',
00516             'reviewgeneralfeedback' => '69888',
00517             'reviewrightanswer' => '69888',
00518             'reviewoverallfeedback' => '4352',
00519         );
00520         $attempt = (object) array(
00521             'id' => '15',
00522             'uniqueid' => '15',
00523             'quiz' => '4',
00524             'userid' => '3',
00525             'attempt' => '1',
00526             'sumgrades' => '0.70000',
00527             'timestart' => '1305830744',
00528             'timefinish' => '0',
00529             'timemodified' => '1305830792',
00530             'layout' => '16,0,17,0,18,0',
00531             'preview' => '0',
00532             'needsupgradetonewqe' => 1,
00533         );
00534         $question = (object) array(
00535             'id' => '18',
00536             'category' => '2',
00537             'parent' => '0',
00538             'name' => 'Calculated',
00539             'questiontext' => '<p>What is {a} m + {b} m?</p><p>_______________</p><p>Remember to type a unit.</p>',
00540             'questiontextformat' => '1',
00541             'generalfeedback' => '',
00542             'generalfeedbackformat' => '1',
00543             'defaultmark' => '1.0000000',
00544             'penalty' => '0.1',
00545             'qtype' => 'calculated',
00546             'length' => '1',
00547             'stamp' => 'tjh238.vledev2.open.ac.uk+110519184316+ELvZeg',
00548             'version' => 'tjh238.vledev2.open.ac.uk+110519184317+exx1Bm',
00549             'hidden' => '0',
00550             'timecreated' => '1305830596',
00551             'timemodified' => '1305830596',
00552             'createdby' => '2',
00553             'modifiedby' => '2',
00554             'maxmark' => '1.0000000',
00555             'options' => (object) array(
00556                 'id' => '2',
00557                 'question' => '18',
00558                 'synchronize' => '0',
00559                 'single' => '0',
00560                 'shuffleanswers' => '1',
00561                 'correctfeedback' => '',
00562                 'correctfeedbackformat' => '0',
00563                 'partiallycorrectfeedback' => '',
00564                 'partiallycorrectfeedbackformat' => '0',
00565                 'incorrectfeedback' => '',
00566                 'incorrectfeedbackformat' => '0',
00567                 'answernumbering' => 'abc',
00568                 'shownumcorrect' => '0',
00569                 'answers' => array(
00570                     28 => (object) array(
00571                         'id' => '28',
00572                         'question' => '18',
00573                         'answer' => '{a} + {b}',
00574                         'answerformat' => '0',
00575                         'fraction' => '1.0000000',
00576                         'feedback' => '',
00577                         'feedbackformat' => '1',
00578                         'tolerance' => '0.01',
00579                         'tolerancetype' => '1',
00580                         'correctanswerlength' => '2',
00581                         'correctanswerformat' => '1',
00582                     ),
00583                 ),
00584                 'units' => array(
00585                     0 => (object) array(
00586                         'id' => '9',
00587                         'question' => '18',
00588                         'multiplier' => 1,
00589                         'unit' => 'm',
00590                     ),
00591                 ),
00592                 'unitgradingtype' => '1',
00593                 'unitpenalty' => '0.5000000',
00594                 'showunits' => '0',
00595                 'unitsleft' => '0',
00596             ),
00597             'hints' => array(
00598             ),
00599         );
00600         $qsession = (object) array(
00601             'id' => '103',
00602             'attemptid' => '15',
00603             'questionid' => '18',
00604             'newest' => '280',
00605             'newgraded' => '279',
00606             'sumpenalty' => '0.1000000',
00607             'manualcomment' => '',
00608             'manualcommentformat' => '1',
00609             'flagged' => '0',
00610         );
00611         $qstates = array(
00612             272 => (object) array(
00613                 'id' => '272',
00614                 'attempt' => '15',
00615                 'question' => '18',
00616                 'seq_number' => '0',
00617                 'answer' => 'dataset1-|||||',
00618                 'timestamp' => '1305830744',
00619                 'event' => '0',
00620                 'grade' => '0.0000000',
00621                 'raw_grade' => '0.0000000',
00622                 'penalty' => '0.0000000',
00623             ),
00624             279 => (object) array(
00625                 'id' => '279',
00626                 'attempt' => '15',
00627                 'question' => '18',
00628                 'seq_number' => '1',
00629                 'answer' => 'dataset1-123|||||cm',
00630                 'timestamp' => '1305830775',
00631                 'event' => '3',
00632                 'grade' => '0.0000000',
00633                 'raw_grade' => '0.0000000',
00634                 'penalty' => '0.1000000',
00635             ),
00636             280 => (object) array(
00637                 'id' => '280',
00638                 'attempt' => '15',
00639                 'question' => '18',
00640                 'seq_number' => '2',
00641                 'answer' => 'dataset1-12.4|||||',
00642                 'timestamp' => '1305830787',
00643                 'event' => '2',
00644                 'grade' => '0.0000000',
00645                 'raw_grade' => '0.5000000',
00646                 'penalty' => '0.1000000',
00647             ),
00648         );
00649         $this->loader->put_dataset_in_cache($question->id, 1, array('a' => '9.9', 'b' => '2.5'));
00650 
00651         $qa = $this->updater->convert_question_attempt($quiz, $attempt, $question, $qsession, $qstates);
00652 
00653         $expectedqa = (object) array(
00654             'behaviour' => 'adaptive',
00655             'questionid' => 18,
00656             'variant' => 1,
00657             'maxmark' => 1.0000000,
00658             'minfraction' => 0,
00659             'flagged' => 0,
00660             'questionsummary' => 'What is 9.9 m + 2.5 m?
00661 
00662 _______________
00663 
00664 Remember to type a unit.',
00665             'rightanswer' => '12.4 m',
00666             'responsesummary' => '12.4',
00667             'timemodified' => 1305830787,
00668             'steps' => array(
00669                 0 => (object) array(
00670                     'sequencenumber' => 0,
00671                     'state' => 'todo',
00672                     'fraction' => null,
00673                     'timecreated' => 1305830744,
00674                     'userid' => 3,
00675                     'data' => array('_separators' => '.$,',
00676                             '_var_a' => '9.9', '_var_b' => '2.5'),
00677                 ),
00678                 1 => (object) array(
00679                     'sequencenumber' => 1,
00680                     'state' => 'todo',
00681                     'fraction' => 0,
00682                     'timecreated' => 1305830775,
00683                     'userid' => 3,
00684                     'data' => array('answer' => '123 cm', '-_try' => 1,
00685                             '-_rawfraction' => 0, '-submit' => 1),
00686                 ),
00687                 2 => (object) array(
00688                     'sequencenumber' => 2,
00689                     'state' => 'complete',
00690                     'fraction' => 0,
00691                     'timecreated' => 1305830787,
00692                     'userid' => 3,
00693                     'data' => array('answer' => '12.4'),
00694                 ),
00695             ),
00696         );
00697 
00698         $this->compare_qas($expectedqa, $qa);
00699     }
00700 }
 All Data Structures Namespaces Files Functions Variables Enumerations