From: Matt L. v. a. <we...@ma...> - 2007-06-29 19:09:54
|
Log Message: ----------- Modified Files: -------------- wwmoodle/wwassignment: lib.php Revision Data ------------- Index: lib.php =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwassignment/lib.php,v retrieving revision 1.14 retrieving revision 1.15 diff -Lwwassignment/lib.php -Lwwassignment/lib.php -u -r1.14 -r1.15 --- wwassignment/lib.php +++ wwassignment/lib.php @@ -152,6 +152,7 @@ /** * @desc Updates and resynchronizes all information related to the a moodle assignment <-> webwork problem set tie. +* @param The ID of the wwassignment to update. */ function wwassignment_update_instance($wwassignment) { global $COURSE; @@ -267,27 +268,6 @@ * @param integer $wwassignmentid The problem set */ function wwassignment_grades($wwassignmentid) { -/// Must return an array of grades for a given instance of this module, -/// indexed by user. It also returns a maximum allowed grade. -/// -/// $return->grades = array of grades; -/// $return->maxgrade = maximum allowed grade; -/// -/// return $return; - // here's how we compute the grade: - // NOTE: each set has P problems in it. - // NOTE: each problem may be attempted M times. - // NOTE: each problem has been attempted A times (by a given user). - // NOTE: each problem was gotten correct C times (by a given user). - // NOTE: each problem was gotten incorrect I times (by a given user). - // Thus, a users grade is: sigma(over P) C/A - // And the max score is P - // Alternately, code is provided for: - // sigma(over P) { if( C > 0) 1 else 0 } - // again with a max of P - - // redefine it here, 'cause for some reason we can't global it... - //debug_log("start grades ".$wwassignmentid); global $COURSE; $webworkclient =& new webwork_client(); $studentgrades->grades = array(); @@ -507,7 +487,7 @@ $this->client = new soap_client(WWASSIGNMENT_WEBWORK_WSDL,'wsdl'); $err = $this->client->getError(); if ($err) { - print_error("Constructor Error"); + print_error("Constructor Error $err"); } $this->defaultparams = array(); $this->defaultparams['authenKey'] = WWASSIGNMENT_WEBWORK_KEY; @@ -534,7 +514,9 @@ if(!$override) { $params = array_merge($this->defaultparams,$params); } + var_dump($params); $result = $this->client->call($functioncall,$params); + var_dump($result); //$result = call_user_func_array(array(&$this->client,$functioncall),$params); if($err = $this->client->getError()) { print_error(get_string("rpc_fault","wwassignment") . " " . $functioncall. " ". $err); @@ -717,6 +699,7 @@ * @return Returns 1 on success. */ function create_user($webworkcourse,&$userdata,$permission="0") { + echo "Creating user" . $permission; $studentid = $userid; $this->handler("add_user",array("courseName" => $webworkcourse, "record" => array( "user_id" => $userdata->username, |