return OK;
end Generate_Face_Solubility;
-
+
function Generate_Face_Titration_Curve(Assignment: in Problem_Generator_Syswides.Assignment_Info.Map;
Answer_Message: in UB_Text;
Answer_Code: in Problem_Generator_Syswides.Answer_RetCode;
Insert(Translations, Assoc(RESERVED_PROBLEM_CATEGORY_KEY, RESERVED_PROBLEM_CATEGORY_KEY));
Insert(Translations, Assoc(RESERVED_PROBLEM_CATEGORY_VAL_KEY, Pr_Cat));
-- Assignment
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_CONC_INT_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_CONC_INT_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_CONC_INT_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_CONC_DEC_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_CONC_DEC_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_CONC_DEC_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_CONC_EXP_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_CONC_EXP_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_CONC_EXP_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_TYPE_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_TYPE_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_TYPE_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.TITRANT_TYPE_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.TITRANT_TYPE_KEY, Assignment.Element(Titration_Curve_Suite.TITRANT_TYPE_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_VOLUME_INT_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_VOLUME_INT_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_VOLUME_INT_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_VOLUME_DEC_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_VOLUME_DEC_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_VOLUME_DEC_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.SAMPLE_VOLUME_EXP_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.SAMPLE_VOLUME_EXP_KEY, Assignment.Element(Titration_Curve_Suite.SAMPLE_VOLUME_EXP_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.TITRANT_CONC_INT_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.TITRANT_CONC_INT_KEY, Assignment.Element(Titration_Curve_Suite.TITRANT_CONC_INT_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.TITRANT_CONC_DEC_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.TITRANT_CONC_DEC_KEY, Assignment.Element(Titration_Curve_Suite.TITRANT_CONC_DEC_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.TITRANT_CONC_EXP_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.TITRANT_CONC_EXP_KEY, Assignment.Element(Titration_Curve_Suite.TITRANT_CONC_EXP_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.PKX1_INT_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.PKX1_INT_KEY, Assignment.Element(Titration_Curve_Suite.PKX1_INT_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.PKX1_DEC_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.PKX1_DEC_KEY, Assignment.Element(Titration_Curve_Suite.PKX1_DEC_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.PKX2_INT_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.PKX2_INT_KEY, Assignment.Element(Titration_Curve_Suite.PKX2_INT_KEY)));
+
+ if Assignment.Find(Titration_Curve_Suite.PKX2_DEC_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
Insert(Translations, Assoc(Titration_Curve_Suite.PKX2_DEC_KEY, Assignment.Element(Titration_Curve_Suite.PKX2_DEC_KEY)));
--
Insert(Translations, Assoc(Titration_Curve_Suite.ANSWER_PH_START_KEY, Titration_Curve_Suite.ANSWER_PH_START_KEY));
case Answer_Code is
when Correct_Answer =>
+ if Assignment.Find(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY) = Assignment_Info.No_Element then
+ return E_INVAL;
+ end if;
+
Insert(Translations_Answer, Assoc(ANSWER_KIND_KEY, ANSWER_KIND_GOOD));
Insert(Translations_Answer, Assoc(ANSWER_MESSAGE_KEY, UB_Text_To_Fixed_String(Answer_Message)));
Insert(Translations_Answer, Assoc(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY, Assignment.Element(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY)));