public function cancel_request($logreturn=false) {
        global $CFG;
        if (!isset($this)) {
            return;
        }
        $this->process_stage_cleanup(true);
        if ($logreturn) {
            redirect($CFG->wwwroot . '/user/portfoliologs.php');
        }
        redirect($this->caller->get_return_url());
        exit;
    }
public function cancel_request($logreturn=false) {
        global $CFG;
        if (!isset($this)) {
            return;
        }
        $this->process_stage_cleanup(true);
        if ($logreturn) {
            redirect($CFG->wwwroot . '/user/portfoliologs.php');
        }
        redirect($this->caller->get_return_url());
        exit;
    }
public function cancel_request ( $ logreturn = false ) { global $ CFG ; if ( ! isset ( $ this ) ) { return ; } $ this -> process_stage_cleanup ( true ) ; if ( $ logreturn ) { redirect ( $ CFG -> wwwroot . '/user/portfoliologs.php' ) ; } redirect ( $ this -> caller -> get_return_url ( ) ) ; exit ; }
Cancels a potfolio request and cleans up the tempdata
and redirects the user back to where they started

@param bool $logreturn options to return to porfolio log or caller return page
@return void
@uses exit
Cancels a potfolio request and cleans up the tempdata and redirects the user back to where they started