Index: temp_moodle_dev/moodle/mod/lamstwo/tooladapter_choice.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lamstwo/tooladapter_choice.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lamstwo/tooladapter_choice.php 14 Nov 2008 06:29:50 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lamstwo/tooladapter_choice.php 18 Nov 2008 04:02:11 -0000 1.2 @@ -1,7 +1,7 @@ lamstwo_serverid) || ! isset($CFG->lamstwo_serverkey) ) { + if ( ! isset($CFG->lamstwo_serverid) || ! isset($CFG->lamstwo_serverkey) ) { header('HTTP/1.1 401 Unauthenticated'); exit(1); - }*/ + } $plaintext = trim($ts).trim($username).trim($CFG->lamstwo_serverid).trim($CFG->lamstwo_serverkey); $hash = sha1(strtolower($plaintext)); - // - /*if ( $hash != $hs ){ + if ( $hash != $hs ){ header('HTTP/1.1 401 Unauthenticated'); exit(1); - }*/ - $method='clone'; - $sectionid=0; - $courseid=2; - $cmid=997; - - - - /*$method = optional_param('method', '', PARAM_TEXT); + } + $method = optional_param('method', '', PARAM_TEXT); $cmid = optional_param('extToolContentID', 0, PARAM_INT); $sectionid = optional_param('section', 1, PARAM_INT); $courseid = optional_param('cs', 1, PARAM_INT); - $outputname = optional_param('oname', '', PARAM_TEXT);*/ + $outputname = optional_param('oname', '', PARAM_TEXT); $user = get_record('user', 'username', $username); @@ -49,7 +41,7 @@ echo $newcmid; break; case 'export': - quiz_export_instance($cmid); + choice_export_instance($cmid); break; case 'export_portfolio': $text = choice_export_portfolio($cmid, $user->id);