Пример #1
0
 public static function singleton()
 {
     if (!isset(self::$client)) {
         //ini_set('soap.wsdl_cache_enabled', '0');
         ini_set('soap.wsdl_cache_ttl', '10');
         self::$client = new SoapClient('http://asa.insto.ru:3989/Service1.svc?wsdl');
     }
     return self::$client;
 }
Пример #2
0
        echo $OUTPUT->heading('Оставшееся время:' . $att->get_time_to_test());
        $test_item = asaFactory::get_attestation_item($USER->username, $att->get_id(), $QuestNo);
        echo $QuestNo . ', ' . $att->get_id() . ', ';
        $mform = new mod_asalink_test_mod_form($test_item, $PAGE->url);
        $mform->display();
        RenderSelectQuestionGreed($att, $PAGE->url);
        $response_set = asaFactory::get_all_responses($USER->username, $att->get_id());
        echo $response_set->get_count();
        //$p = asaFactory::create_response_as_param($response_set->get_response(1));
        //$response = $test_item->create_editable_response();
        //$response->get_response_item(1)->set_value("1");
        //asaFactory::set_responses($USER->username,
        //        $att->get_id(), $response);
        //var_dump($response);
    } else {
        if ($att->get_id() != empty_guid) {
            echo html_writer::start_tag("p");
            echo "Отправлен запрос на аттестацию.";
            echo html_writer::end_tag("p");
        }
        $mform = new mod_asalink_mod_form($PAGE->url->out());
        if ($mform->is_user_press_begin_attestation()) {
            $att = asaFactory::begin_attestation($USER->username, $asalink->testname);
        }
        if ($mform->is_user_press_abort_attestation()) {
            echo "<BR/>Abort att ";
        }
        $mform->display();
    }
}
echo $OUTPUT->footer();