R) (_ID_TEST INTEGER, _ID_QUESTION INTEGER, _NUM INTEGER, _QUESTION_DESCRIPTION VARCHAR (128))
AS
/ * отримуємо по ід-тесту список питань для промальовування на сторінці * / LQ.ID_QUERY, LQ.ID_TEST, LQ.NUM, «Питання №» | | INTTOSTR (LQ.NUM, « ;% d »)
FROM L_QUERY LQLQ.ID_TEST =: IN_ID_TEST: OUT_ID_QUESTION,: OUT_ID_TEST,: OUT_NUM,: OUT_QUESTION_DESCRIPTIONSUSPEND; ^ PROCEDURE REP_GET_VARIANT (_QUESTION_NUMBER INTEGER) (_ID_ANSWER INTEGER, _IS_CORRECT INTEGER, _TEXT VARCHAR (128), _SCORE DOUBLE PRECISION, _NUMBER INTEGER, _AUERY_TEXT VARCHAR (512))
AS
/ * Отримуємо список варіантів відповіді з питання * /
SELECT TEXTL_QUERYID_QUERY =: IN_QUESTION_NUMBER: OUT_AUERY_TEXT; _number=0; la.ID_ANSWER, la.IS_CORRECT, la.TEXT, la.SCOREL_ANSWER lala.ID_QUERY =: IN_QUESTION_NUMBERBY ID_ANSWER: OUt_ID_ANSWER,: OUT_IS_CORRECT,: OUT_TEXT ,: OUT_SCOREBEGIN_NUMBER=OUT_NUMBER +1;; ^ PROCEDURE W_ADD_QUERY (_ID_TEST INTEGER) (_ID_QUERY INTEGER) VARIABLE V_NUM INTEGER;
BEGIN
/ * Додаємо ЗАПИС В СПИСОК ПИТАНЬ ТЕСТА * /
SELECT MAX (Q.NUM) +1 L_QUERY QQ.ID_TEST =: IN_ID_TEST: V_NUM; GEN_ID (G_ID_QUERY_TYPE, 1) RDB $ DATABASE: OUT_ID_QUERY; INTO L_QUERY (ID_QUERY, ID_TEST, NUM) (: OUT_ID_QUERY ,: IN_ID_TEST,: V_NUM);; ^ PROCEDURE W_SAVE_QUERY (_ID_QUERY INTEGER, _QUERY_TEXT VARCHAR (512), _TEXT_1 VARCHAR (128), _TEXT_2 VARCHAR (128), _TEXT_3 VARCHAR (128), _TEXT_4 VARCHAR (128), _TEXT_5 VARCHAR (128 ), _CORRECT_1 VARCHAR (5), _CORRECT_2 VARCHAR (5), _CORRECT_3 ??VARCHAR (5), _CORRECT_4 VARCHAR (5), _CORRECT_5 VARCHAR (5), _SCORE_1 DOUBLE PRECISION, _SCORE_2 DOUBLE PRECISION, _SCORE_3 DOUBLE PRECISION, _SCORE_4 DOUBLE PRECISION, _SCORE_5 DOUBLE PRECISION) (_SUCCESS INTEGER, _MESSAGE VARCHAR (128)) VARIABLE V_ID_ANSWER INTEGER; VARIABLE V_CORRECT INTEGER; VARIABLE v_num INTEGER;
BEGIN
/ * Процедура зберігає дані з форми * / _MESSAGE=«Питання збережений.»;
/ * запишемо параметри питання * /
FORID_ANSWER, NUML_ANSWERID_QUERY =: IN_ID_QUERYBY NUM: V_ID_ANSWER,: V_NUMBEGIN
/*---------------------------------------------------------------------------*/(V_NUM =1) THEN (IN_TEXT_1="") THENFROM L_ANSWERID_ANSWER =: V_ID_ANSWER; (IN_CORRECT_1=«on») V_CORRECT=1; V_CORRECT=0; L_ANSWERTEXT =: IN_TEXT_1, _CORRECT =: V_CORRECT, =: IN_SCORE_1ID_ANSWER =: V_ID_ANSWER ;
/*---------------------------------------------------------------------------*/(V_NUM =2) THEN (IN_TEXT_2="") THENFROM L_ANSWERID_ANSWER =: V_ID_ANSWER; (IN_CORRECT_2=«on») V_CORRECT=1; V_CORRECT=0; L_ANSWERTEXT =: IN_TEXT_2, _CORRECT =: V_CORRECT, =: IN_SCORE_2ID_ANSWER =: V_ID_ANSWER ;
/*---------------------------------------------------------------------------*/(V_NUM =3) THEN (IN_TEXT_3="") THENFROM L_ANSWERID_ANSWER =: V_ID_ANSWER; (IN_CORRECT_3 ??= «on») V_CORRECT=1; V_CORRECT=0; L_ANSWERTEXT =: IN_TEXT_3, _CORRECT =: V_CORRECT, =: IN_SCORE_3ID_ANSWER =: V_ID_ANSWER ;
/*---------------------------------------------------------------------------*/(V_NUM =4) THEN (IN_TEXT_4="") THENFROM L_ANSWERID_ANSWER =: V_ID_ANSWER; (IN_CORRECT_4=«on») V_CORRECT=1; V_CORRECT=0; L_ANSW...