[system] / trunk / wwmoodle / wwassignment4 / moodle / mod / wwassignment / simpletest / testwwassignment.php Repository:
ViewVC logotype

View of /trunk/wwmoodle/wwassignment4/moodle/mod/wwassignment/simpletest/testwwassignment.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5674 - (download) (as text) (annotate)
Thu May 22 14:36:25 2008 UTC (11 years, 9 months ago) by gage
File size: 1039 byte(s)
wwassignment4 is a version of "bridge1" which is compatible with moodle 1.9 and webwork 2.4.x

It adds a new assignment like activity called wwassignment.

It works but does not yet have much testing and has the potential that
the webwork and moodle databases might get out of sync.

The structure is similar enough that it might eventually be a good idea
to implement it as a new assignment type.

Bridge2 adds a question type to the moodle quiz.  It is requires a different
set of software

    1 <?php
    2 require_once(dirname(__FILE__) . '/../../config.php');
    3 
    4 global $CFG;
    5 
    6 require_once($CFG->libdir . '/simpletestlib.php');
    7 require_once($CFG->dirroot . '/mod/wwassignment/locallib.php');
    8 
    9 class wwassignment_test extends UnitTestCase {
   10 
   11     function setUp() {
   12     }
   13 
   14     function tearDown() {
   15     }
   16 
   17     /**
   18     * @desc Test Module Name.
   19     */
   20     function test_name() {
   21         $this->assertEqual($this->qtype->name(),'webwork','Module Test');
   22     }
   23 
   24     /**
   25     * @desc Test WSDL Path is set.
   26     */
   27     function test_wsdl_path() {
   28         $this->assertNotEqual(WWQUESTION_WSDL,'ENTER YOUR WSDL PATH HERE','WSDL Path Test');
   29     }
   30 
   31     /**
   32     * @desc Test Webwork Path
   33     */
   34     function test_webwork_path() {
   35     }
   36 
   37     /**
   38     * @desc Test Basic Communication
   39     */
   40     function test_basic_communication() {
   41         $client = new wwassignment_client();
   42         $response = $client->handler('hello');
   43         $this->assertEqual('hello world!',$response,'Webwork Server Communication Test.');
   44     }
   45 }
   46 
   47 ?>
   48 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9