$theurl = $theurl . 'lti_launch_id=' . $launch->id(); if ($launch && $launch->data()) { $LTI = new LTIObject($launch->data()); DPRT("User Data"); DPRTR($LTI->user()); DPRT("Course Data"); DPRTR($LTI->course()); DPRT("Membership Data"); DPRTR($LTI->memb()); DPRT("Organization Data"); DPRTR($LTI->org()); } DPRT("Request Dump"); DPRTR($_REQUEST); DPRT("Server Dump"); DPRTR($_SERVER); dumpDebugLog(); // The web service response if ($_REQUEST[action] == 'launchresolve') { print "<launchResponse>\n"; print " <status>success</status>\n"; print " <type>iframe</type>\n"; print " <launchUrl>" . htmlspecialchars($theurl) . "</launchUrl>\n"; print " <launchdebug>\n"; print getDebugLogXML(); print " </launchdebug>\n"; print "</launchResponse>\n"; } else { if ($_REQUEST[action] == 'direct' && !$_REQUEST[ltidebugpause]) { if (!headers_sent()) { header("Location: {$theurl}");
function load_from_row($result, $row) { $this->clear(); $count = mysql_num_fields($result); $newrow = array(); for ($i = 0; $i < $count; $i += 1) { $fld = mysql_fetch_field($result, $i); if ($this->tablename != $fld->table) { continue; } DPRT("Row Adding {$fld->name} = {$row[$i]} \n"); if ($fld->name == "id") { $this->idvalue = $row[$i]; } else { $newrow[$fld->name] = $row[$i]; } } DPRTR($newrow); $this->datafields = $newrow; if (!$this->idvalue) { WARN("Model {$this->modelname} load_from_row did not find id column"); return false; } return true; }