]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Finish walkthrough implementation for solubility suite, V FROM G KS. master
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 7 Jan 2015 19:10:41 +0000 (20:10 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 7 Jan 2015 19:10:41 +0000 (20:10 +0100)
- Use global Finalize for Chem_Problem

18 files changed:
bin/templates/face_solubility_submit.html
bin/templates/face_solubility_v_f_g_ks.html
bin/templates/walkthrough_solubility_vksgmw.html [new file with mode: 0644]
bin/tex2ima
bin/walkthrough_templates/solubility_suite/v_answer.ttex [new file with mode: 0644]
bin/walkthrough_templates/solubility_suite/v_diss_c.ttex [new file with mode: 0644]
bin/walkthrough_templates/solubility_suite/v_plug_c.ttex [new file with mode: 0644]
bin/walkthrough_templates/solubility_suite/v_plug_volume.ttex [new file with mode: 0644]
bin/walkthrough_templates/solubility_suite/v_pre_radex.ttex [new file with mode: 0644]
src/face_generators/face_generator.adb
src/face_generators/face_generator.ads
src/face_generators/face_generator_static.adb
src/problem_generators/problem_generator-acidobazic_suite.adb
src/problem_generators/problem_generator-solubility_suite.adb
src/problem_generators/problem_generator-titration_curve_suite.adb
src/problem_generators/problem_generator.adb
src/problem_generators/problem_generator.ads
src/problem_generators/problem_generator_syswides.ads

index 7994b92b7f74f3811c567a9c24f2f33ea585e8e7..155c9d7f3b12b8de03b438aee84e4f81da40da00 100644 (file)
@@ -8,3 +8,9 @@
          <input type="submit" name="send_answer" value="Zkontrolovat" />
        </div>
       </form>
+      <form class="problem_form" method="post" action="/show_walkthrough">
+        <input type="hidden" name="@_RESERVED__PROBLEM_ID_@" value="@_RESERVED__PROBLEM_ID_VAL_@" />
+        <div class="form_line">
+         <input type="submit" name="show_walkthrough" value="Zobrazit řešení" />
+        </div>
+      </form>
index 0efead909956b705b341726a2d111d4d194ca7a9..7ebf58b204f459cc4e9d216ec6b22ba9397f5198 100644 (file)
@@ -5,6 +5,7 @@
     @_SUBMIT_FORM_@
     </div>
  
+    @_WALKTHROUGH_SECTION_@
     @_ANSWER_SECTION_@
 
     <div class="backgrounded_block">
diff --git a/bin/templates/walkthrough_solubility_vksgmw.html b/bin/templates/walkthrough_solubility_vksgmw.html
new file mode 100644 (file)
index 0000000..f183eb2
--- /dev/null
@@ -0,0 +1,27 @@
+  <div class="backgrounded_block">
+    <div class="caption_v1">Řešení:</div>
+      <div class="hint_block">
+        <div class="hint_caption">
+         Koncentrace rozpuštěné soli:
+       </div>
+       <img class="math_formula_multiline" src="/images/sol_def_soluted_conc.png" alt="Koncentrace rozpuštěné soli" />
+       <img class="math_formula_multiline" src="@_WT_V_PLUG_C_RESULT_@" alt="Koncentrace rozpuštěné soli" />
+       <img class="math_formula" src="@_WT_V_PRE_RADEX_RESULT_@" alt="Koncentrace rozpuštěné soli" />
+       <img class="math_formula" src="@_WT_V_DISS_C_RESULT_@" alt="Koncentrace rozpuštěné soli" />
+      </div>
+
+      <div class="hint_block">
+        <div class="hint_caption">
+         Objem, ve kterém se dané množství soli práve zcela rozpustí:
+       </div>
+       <img class="math_formula_multiline" src="/images/sol_volume.png" alt="Objem" />
+       <img class="math_formula_multiline" src="@_WT_V_PLUG_VOLUME_RESULT_@" alt="Objem" />
+      </div>
+
+      <div class="hint_block">
+        <div class="hint_caption">
+         Konečný výsledek:
+       </div>
+       <img class="math_formula" src="@_WT_FINAL_RESULT_@" alt="Konečný výsledek" />
+      </div>
+  </div>
index 7e056a581906152e47953c1d1218e759c9598c49..ea67ee4ff990febc21a187334dbd3a9b221bc200 100755 (executable)
@@ -45,7 +45,7 @@ fi;
 homedir="`pwd`" || exit 1  
 
 if test -n "`type -p mktemp`" ; then
-       tmpdir=`mktemp ${homedir}/tmp/tex2imXXXXXX`
+       tmpdir=`mktemp ${homedir}/tmp/tex2imXXXXXX` || exit 1
        rm $tmpdir
        mkdir $tmpdir
 else
diff --git a/bin/walkthrough_templates/solubility_suite/v_answer.ttex b/bin/walkthrough_templates/solubility_suite/v_answer.ttex
new file mode 100644 (file)
index 0000000..24df8aa
--- /dev/null
@@ -0,0 +1 @@
+V = @_WT_RES_INT_@,@_WT_RES_DEC_@ \cdot 10^{@_WT_RES_EXP_@}~\si{\cubic\deci\metre}
diff --git a/bin/walkthrough_templates/solubility_suite/v_diss_c.ttex b/bin/walkthrough_templates/solubility_suite/v_diss_c.ttex
new file mode 100644 (file)
index 0000000..8b968c1
--- /dev/null
@@ -0,0 +1 @@
+c = @_WT_DC_INT_@,@_WT_DC_DEC_@ \cdot 10^{@_WT_DC_EXP_@}~\si{\mol\per\cubic\deci\metre}
diff --git a/bin/walkthrough_templates/solubility_suite/v_plug_c.ttex b/bin/walkthrough_templates/solubility_suite/v_plug_c.ttex
new file mode 100644 (file)
index 0000000..fcec460
--- /dev/null
@@ -0,0 +1 @@
+c = \sqrt[@_WT_M_@ + @_WT_N_@]{\frac{@_WT_KS_INT_@,@_WT_KS_DEC_@ \cdot 10^{@_WT_KS_EXP_@}}{@_WT_M_@^@_WT_M_@ @_WT_N_@^@_WT_N_@}}~\si{\mol\per\cubic\deci\metre}
diff --git a/bin/walkthrough_templates/solubility_suite/v_plug_volume.ttex b/bin/walkthrough_templates/solubility_suite/v_plug_volume.ttex
new file mode 100644 (file)
index 0000000..d4b9484
--- /dev/null
@@ -0,0 +1 @@
+V = \frac{@_WT_G_INT_@,@_WT_G_DEC_@}{@_WT_MW_INT_@,@_WT_MW_DEC_@ \cdot @_WT_DC_INT_@,@_WT_DC_DEC_@ \cdot 10^{@_WT_DC_EXP_@}}~\si{\cubic\deci\metre}
diff --git a/bin/walkthrough_templates/solubility_suite/v_pre_radex.ttex b/bin/walkthrough_templates/solubility_suite/v_pre_radex.ttex
new file mode 100644 (file)
index 0000000..4d899a2
--- /dev/null
@@ -0,0 +1 @@
+c = \sqrt[@_WT_MPN_@]{@_WT_KDMN_INT_@,@_WT_KDMN_DEC_@ \cdot 10^{@_WT_KDMN_EXP_@}}~\si{\mol\per\cubic\deci\metre}
index 96b1e0e417d11273ffc3646c14dff1a21392f878..08f02e7275199fe48db331655590fbf52aa04ce7 100644 (file)
@@ -212,6 +212,46 @@ package body Face_Generator is
     return OK;
   end Add_Walkthrough_Acidobazic;
 
+  function Add_Walkthrough_Solubility_V_FROM_G_KS(Translations: in out AWS.Templates.Translate_Set;
+                                                 Walkthrough: in Problem_Generator_Syswides.Walkthrough_Info.Map) return RetCode is
+    use AWS.Templates;
+    use Problem_Generator_Syswides;
+    use Problem_Generator_Syswides.Solubility_Suite;
+    use Problem_Generator_Syswides.Walkthrough_Info;
+
+    WTrans: Translate_Set;
+    HTML: HTML_Code;
+  begin
+    if Walkthrough.Find(WT_V_PLUG_C_RESULT_KEY) = Walkthrough_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(WTrans, Assoc(WT_V_PLUG_C_RESULT_KEY, Walkthrough.Element(WT_V_PLUG_C_RESULT_KEY)));
+
+    if Walkthrough.Find(WT_V_PRE_RADEX_RESULT_KEY) = Walkthrough_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(WTrans, Assoc(WT_V_PRE_RADEX_RESULT_KEY, Walkthrough.Element(WT_V_PRE_RADEX_RESULT_KEY)));
+
+    if Walkthrough.Find(WT_V_DISS_C_RESULT_KEY) = Walkthrough_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(WTrans, Assoc(WT_V_DISS_C_RESULT_KEY, Walkthrough.Element(WT_V_DISS_C_RESULT_KEY)));
+
+    if Walkthrough.Find(WT_V_PLUG_VOLUME_RESULT_KEY) = Walkthrough_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(WTrans, Assoc(WT_V_PLUG_VOLUME_RESULT_KEY, Walkthrough.Element(WT_V_PLUG_VOLUME_RESULT_KEY)));
+
+    if Walkthrough.Find(WT_FINAL_RESULT_KEY) = Walkthrough_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(WTrans, Assoc(WT_FINAL_RESULT_KEY, Walkthrough.Element(WT_FINAL_RESULT_KEY)));
+
+    HTML := Parse(Filename => "templates/walkthrough_solubility_vksgmw.html", Translations => WTrans);
+    Insert(Translations, Assoc(WALKTHROUGH_SECTION_KEY, HTML_To_Fixed_String(HTML)));
+    return OK;
+  end Add_Walkthrough_Solubility_V_FROM_G_KS;
+
   function Generate_Face_Acidobazic(Mode: in Display_Mode;
                                    Assignment: in Problem_Generator_Syswides.Assignment_Info.Map;
                                    Answer_Message: in UB_Text;
@@ -355,6 +395,7 @@ package body Face_Generator is
 
     P_Subtype: UB_Text;
   begin
+    P_Subtype := To_UB_Text(Parameters.Element(Solubility_Suite.PARAMETER_PROBLEM_SUBTYPE_KEY));
     Insert(Translations_Hdr, Assoc(HEADER_CAPTION_KEY, "&lt;&nbsp;" & Solubility_Suite.PROBLEM_NAME_READABLE));
     HTML := Parse(Filename => "templates/header.html", Translations => Translations_Hdr);
     -- Add JavaScripts
@@ -364,6 +405,20 @@ package body Face_Generator is
     case Mode is
       when Answer_Mode =>
        Add_Answer_Section(Translations, Answer_Message, Answer_Code);
+      when Walkthrough_Mode =>
+       declare
+         Ret: RetCode;
+       begin
+          if P_Subtype = Solubility_Suite.PROBLEM_SUBTYPE_V_FROM_G_KS then
+           Ret := Add_Walkthrough_Solubility_V_FROM_G_KS(Translations, Walkthrough);
+         else
+           return E_NOTIMPL;
+         end if;
+
+         if Ret /= OK then
+           return Ret;
+         end if;
+       end;
       when others =>
        null;
     end case;
@@ -396,7 +451,6 @@ package body Face_Generator is
       -- This parameter must be always present
       return E_INVAL;
     end if;
-    P_Subtype := To_UB_Text(Parameters.Element(Solubility_Suite.PARAMETER_PROBLEM_SUBTYPE_KEY));
     Insert(Translations_Params, Assoc(Solubility_Suite.PARAMETER_PROBLEM_SUBTYPE_KEY, Solubility_Suite.PARAMETER_PROBLEM_SUBTYPE_KEY));
     Insert(Translations_Params, Assoc(Solubility_Suite.PROBLEM_SUBTYPE_V_FROM_G_KS, Solubility_Suite.PROBLEM_SUBTYPE_V_FROM_G_KS));
     Insert(Translations_Params, Assoc(Solubility_Suite.PROBLEM_SUBTYPE_KS_FROM_G_V, Solubility_Suite.PROBLEM_SUBTYPE_KS_FROM_G_V));
index 89002e70c70af8c6da15e58cab6620e2611e3a8c..dc96e7055dcc6330c116dd217174df07fff388e1 100644 (file)
@@ -42,6 +42,10 @@ private
 
   function Add_Walkthrough_Acidobazic(Translations: in out AWS.Templates.Translate_Set;
                                      Walkthrough: in Problem_Generator_Syswides.Walkthrough_Info.Map) return RetCode;
+
+  function Add_Walkthrough_Solubility_V_FROM_G_KS(Translations: in out AWS.Templates.Translate_Set;
+                                                 Walkthrough: in Problem_Generator_Syswides.Walkthrough_Info.Map) return RetCode;
+
   function Generate_Face_Acidobazic(Mode: in Display_Mode;
                                    Assignment: in Problem_Generator_Syswides.Assignment_Info.Map;
                                    Answer_Message: in UB_Text;
index d92d7268d6181c8593dc2dbd84206121661fe308..a68100743caa6ee40a80f6c8d62f3538a2745e35 100644 (file)
@@ -36,7 +36,7 @@ package body Face_Generator_Static is
   function Error_Display_Walkthrough return HTML_Code is
     use AWS.Templates;
   begin
-    return Parse(Filename => "templates/static/error_display_answer.html");
+    return Parse(Filename => "templates/static/error_display_walkthrough.html");
   end Error_Display_Walkthrough;
 
   function Error_UID_Registration return HTML_Code is
index f3e26c50f3b07aef1db0492c949d51ab42619f53..fc0532fd90f7a15044eb4ad4e7bad6dc2b281888 100644 (file)
@@ -711,10 +711,4 @@ package body Acidobazic_Suite is
     return ((Problem.Kx * Problem.cX) ** (0.5)) / Problem.cX;
   end Walkthrough_Check_Dissociation;
 
-  -- Destructor
-  overriding procedure Finalize(Problem: in out Acidobazic_Problem) is
-  begin
-    Problem.Free_Tracked_Resources;
-  end Finalize;
-
 end Acidobazic_Suite;
index 85e884ff016976c034a728f1bd3b1e0368ef3917..3b065c65dbc86290563b8897d1e0600faf228ca6 100644 (file)
@@ -16,6 +16,7 @@ package body Solubility_Suite is
   begin
     Problem := new Solubility_Problem;
     Problem.Parameters := Solubility_Parameters'(Ionic_Strength => False, P_Subtype => V_FROM_G_KS);
+    Problem.Walkthrough_Generated := False;
     return Problem;
   end;
 
@@ -332,7 +333,7 @@ package body Solubility_Suite is
       -- This parameter must be always present
       return E_INVAL;
     end if;
-      
+
     return OK;
   end Set_Parameters;
 
@@ -526,19 +527,22 @@ package body Solubility_Suite is
     DC_Dec_Str: UB_Text;
     DC_Exp_Str: UB_Text;
 
-    M_Int: Integer := Integer(Problem.Prob_Data.M);
-    N_Int: Integer := Integer(Problem.Prob_Data.N);
-    Final_Trans: Translate_Set;
+    M_Int: constant Integer := Integer(Problem.Prob_Data.M);
+    N_Int: constant Integer := Integer(Problem.Prob_Data.N);
     TeXCode: UB_Text;
     Ret: RetCode;
   begin
+    if Problem.Walkthrough_Generated then
+      Walkthrough := Problem.Walkthrough_Stored;
+      return OK;
+    end if;
     -- Init multicontext data
     FH.Split_Integer_Decimal_Exponent_Strs(Diss_C, DECIMALS, DC_Int_Str, DC_Dec_Str, DC_Exp_Str);
 
     -- Plug the numbers into the raw equation for dissolved concentration
     declare
-      M_Str: String := Integer'Image(M_Int);
-      N_Str: String := Integer'Image(N_Int);
+      M_Str: constant String := Integer'Image(M_Int);
+      N_Str: constant String := Integer'Image(N_Int);
       Ks_Int_Str: UB_Text;
       Ks_Dec_Str: UB_Text;
       Ks_Exp_Str: UB_Text;
@@ -552,13 +556,13 @@ package body Solubility_Suite is
       Insert(Trans, Assoc(WT_M_KEY, M_Str));
       Insert(Trans, Assoc(WT_N_KEY, N_Str));
 
-      TeXCode := Parse(Filename => WT_T_PREFIX & "v_plug_numbers.ttex", Translations => Trans);
-      Ret := TeX_To_PNG(TeXCode, WT_F_V_PLUGNUMS, Problem.Resource_Prefix);
+      TeXCode := Parse(Filename => WT_T_PREFIX & "v_plug_c.ttex", Translations => Trans);
+      Ret := TeX_To_PNG(TeXCode, WT_F_V_PLUG_C, Problem.Resource_Prefix);
       if Ret /= OK then
        return Ret;
       end if;
-      Problem.Add_Tracked_Resource(WT_F_V_PLUGNUMS & WT_F_EXTENSION);
-      Insert(Final_Trans, Assoc(WT_V_PLUG_C_RESULT_KEY, PRP_Fixed & WT_F_V_PLUGNUMS & WT_F_EXTENSION));
+      Problem.Add_Tracked_Resource(WT_F_V_PLUG_C & WT_F_EXTENSION);
+      Walkthrough.Insert(WT_V_PLUG_C_RESULT_KEY, PRP_Fixed & WT_F_V_PLUG_C & WT_F_EXTENSION);
     end;
 
     -- Show the result just before root extraction
@@ -582,7 +586,7 @@ package body Solubility_Suite is
        return Ret;
       end if;
       Problem.Add_Tracked_Resource(WT_F_V_PRE_RADEX & WT_F_EXTENSION);
-      Insert(Final_Trans, Assoc(WT_V_PRE_RADEX_RESULT_KEY, PRP_Fixed & WT_F_V_PRE_RADEX & WT_F_EXTENSION));
+      Walkthrough.Insert(WT_V_PRE_RADEX_RESULT_KEY, PRP_Fixed & WT_F_V_PRE_RADEX & WT_F_EXTENSION);
     end;
 
     -- Dissolved concentration
@@ -595,12 +599,12 @@ package body Solubility_Suite is
       Insert(Trans, Assoc(WT_DC_EXP_KEY, DC_Exp_Str));
 
       TeXCode := Parse(Filename => WT_T_PREFIX & "v_diss_c.ttex", Translations => Trans);
-      Ret := TeX_To_PNG(TeXCode, WT_F_V_PRE_RADEX, Problem.Resource_Prefix);
+      Ret := TeX_To_PNG(TeXCode, WT_F_V_DISS_C, Problem.Resource_Prefix);
       if Ret /= OK then
        return Ret;
       end if;
       Problem.Add_Tracked_Resource(WT_F_V_DISS_C & WT_F_EXTENSION);
-      Insert(Final_Trans, Assoc(WT_V_DISS_C_RESULT_KEY, PRP_Fixed & WT_F_V_PRE_RADEX & WT_F_EXTENSION));
+      Walkthrough.Insert(WT_V_DISS_C_RESULT_KEY, PRP_Fixed & WT_F_V_DISS_C & WT_F_EXTENSION);
     end;
 
     -- Plug the numbers into the volume calculation
@@ -613,7 +617,7 @@ package body Solubility_Suite is
       Trans: Translate_Set;
     begin
       FH.Split_Integer_Decimal_Unscaled_Strs(Problem.Prob_Data.V_G, DECIMALS, G_Int_Str, G_Dec_Str);
-      FH.Split_Integer_Decimal_Unscaled_Strs(Problem.Prob_Data.V_MW, DECIMALS, MW_Int_Str, MW_Dec_Str);
+      FH.Split_Integer_Decimal_Unscaled_Strs(Problem.Prob_Data.V_MW, DECIMALS_MW, MW_Int_Str, MW_Dec_Str);
 
       Insert(Trans, Assoc(WT_G_INT_KEY, G_Int_Str));
       Insert(Trans, Assoc(WT_G_DEC_KEY, G_Dec_Str));
@@ -623,13 +627,13 @@ package body Solubility_Suite is
       Insert(Trans, Assoc(WT_DC_DEC_KEY, DC_Dec_Str));
       Insert(Trans, Assoc(WT_DC_EXP_KEY, DC_Exp_Str));
 
-      TeXCode := Parse(Filename => WT_T_PREFIX & "v_volume_plug.ttex", Translations => Trans);
-      Ret := TeX_To_PNG(TeXCode, WT_F_V_PLUG, Problem.Resource_Prefix);
+      TeXCode := Parse(Filename => WT_T_PREFIX & "v_plug_volume.ttex", Translations => Trans);
+      Ret := TeX_To_PNG(TeXCode, WT_F_V_PLUG_VOLUME, Problem.Resource_Prefix);
       if Ret /= OK then
        return Ret;
       end if;
-      Problem.Add_Tracked_Resource(WT_F_V_PLUG & WT_F_EXTENSION);
-      Insert(Final_Trans, Assoc(WT_V_PLUG_VOLUME_RESULT_KEY, PRP_Fixed & WT_F_V_PLUG & WT_F_EXTENSION));
+      Problem.Add_Tracked_Resource(WT_F_V_PLUG_VOLUME & WT_F_EXTENSION);
+      Walkthrough.Insert(WT_V_PLUG_VOLUME_RESULT_KEY, PRP_Fixed & WT_F_V_PLUG_VOLUME & WT_F_EXTENSION);
     end;
 
     -- Display the final result
@@ -652,9 +656,10 @@ package body Solubility_Suite is
        return Ret;
       end if;
       Problem.Add_Tracked_Resource(WT_F_ANSWER & WT_F_EXTENSION);
-      Insert(Final_Trans, Assoc(WT_ANSWER_RESULT_KEY, PRP_Fixed & WT_F_ANSWER & WT_F_EXTENSION));
+      Walkthrough.Insert(WT_FINAL_RESULT_KEY, PRP_Fixed & WT_F_ANSWER & WT_F_EXTENSION);
     end;
 
+    Problem.Walkthrough_Generated := True; 
     return OK;
   end Gen_Walkthrough_V_FROM_G_KS;
 
index 4034a354d6202042159e6a839b71276adbd127d3..7c3e2b3ba898c15ab8355ab838339a5db5c98f5b 100644 (file)
@@ -300,11 +300,6 @@ package body Titration_Curve_Suite is
   begin
     return OK;
   end Set_Parameters;
-
-  overriding procedure Finalize(Problem: in out Titration_Curve_Problem) is
-  begin
-    Free_Tracked_Resources(Problem);
-  end Finalize;
   -- END: Inherited functions
 
   -- BEGIN: Private functions
index ff5cebfa5ab2d67a06700e36e05656fed3c2eec4..41126b851cfcdcae59d7230234684dcfc170c43e 100644 (file)
@@ -59,6 +59,11 @@ package body Problem_Generator is
     Problem.Resource_Prefix := Ada.Strings.Unbounded.To_Unbounded_String(Prefix);
   end Set_Resource_Prefix;
 
+  procedure Finalize(Problem: in out Chem_Problem) is
+  begin
+    Free_Tracked_Resources(Problem);
+  end Finalize;
+
   package body Acidobazic_Suite is separate;
   package body Solubility_Suite is separate;
   package body Titration_Curve_Suite is separate;
index 8169b59866ae735ea1303e22d8216696758a1a71..15c1487fba77bfbd3cefa90995dd96d6a5a4b12b 100644 (file)
@@ -19,6 +19,7 @@ package Problem_Generator is
   procedure New_Problem(Problem: in out Chem_Problem) is abstract;
   function Set_Parameters(Problem: in out Chem_Problem; Parameters: in Parameters_Info.Map) return RetCode is abstract;
   procedure Set_Resource_Prefix(Problem: in out Chem_Problem; Prefix: in String);
+  --
   function Get_Problem(P_Type: in Problem_Type) return access Chem_Problem'Class;
 
 private
@@ -29,9 +30,12 @@ private
     record
       Resource_Prefix: Ada.Strings.Unbounded.Unbounded_String;
       TRL: Resource_List.List;
+      Walkthrough_Generated: Boolean;
+      Walkthrough_Stored: Problem_Generator_Syswides.Walkthrough_Info.Map;
     end record;
   procedure Add_Tracked_Resource(Problem: in out Chem_Problem; Name: in String);
   procedure Free_Tracked_Resources(Problem: in out Chem_Problem);
+  procedure Finalize(Problem: in out Chem_Problem);
 
   WT_F_EXTENSION: constant String := ".png";
   WALKTHROUGH_TEMPLATES_PATH: constant String := "walkthrough_templates/";
@@ -49,7 +53,6 @@ private
       function Get_Parameters(Problem: in out Acidobazic_Problem; Parameters: out Parameters_Info.Map) return RetCode;
       function Get_Walkthrough(Problem: in out Acidobazic_Problem; Walkthrough: out Walkthrough_Info.Map) return RetCode;
       function Set_Parameters(Problem: in out Acidobazic_Problem; Parameters: in Parameters_Info.Map) return RetCode;
-      overriding procedure Finalize(Problem: in out Acidobazic_Problem);
 
     private
       type pH_Float is digits 15;
@@ -88,8 +91,6 @@ private
          Parameters: Acidobazic_Parameters;
          Simpl: Simplification;
          Subst_Type: Substance_Type;
-         Walkthrough_Generated: Boolean;
-         Walkthrough_Stored: Problem_Generator_Syswides.Walkthrough_Info.Map;
        end record;
 
       Acidic_Min_pH: constant pH_Float := 1.75;
@@ -221,9 +222,9 @@ private
     WT_T_PREFIX: constant String := WALKTHROUGH_TEMPLATES_PATH & "solubility_suite/";
     WT_F_ANSWER: constant String := "answer";
     WT_F_V_DISS_C: constant String := "v_diss_c";
-    WT_F_V_PLUGNUMS: constant String := "v_plug_nums";
+    WT_F_V_PLUG_C: constant String := "v_plug_c";
     WT_F_V_PRE_RADEX: constant String := "v_pre_radex";
-    WT_F_V_PLUG: constant String := "v_plug";
+    WT_F_V_PLUG_VOLUME: constant String := "v_plug_volume";
     --
     WT_DC_INT_KEY: constant String := "WT_DC_INT";
     WT_DC_DEC_KEY: constant String := "WT_DC_DEC";
@@ -239,11 +240,11 @@ private
     WT_M_KEY: constant String := "WT_M";
     WT_N_KEY: constant String := "WT_N";
     WT_MPN_KEY: constant String := "WT_MPN";
-    WT_MW_INT_KEY: constant String := "WT_MW_INT_KEY";
-    WT_MW_DEC_KEY: constant String := "WT_MW_DEC_KEY";
-    WT_RES_INT_KEY: constant String := "WT_RES_INT_KEY";
-    WT_RES_DEC_KEY: constant String := "WT_RES_DEC_KEY";
-    WT_RES_EXP_KEY: constant String := "WT_RES_EXP_KEY";
+    WT_MW_INT_KEY: constant String := "WT_MW_INT";
+    WT_MW_DEC_KEY: constant String := "WT_MW_DEC";
+    WT_RES_INT_KEY: constant String := "WT_RES_INT";
+    WT_RES_DEC_KEY: constant String := "WT_RES_DEC";
+    WT_RES_EXP_KEY: constant String := "WT_RES_EXP";
 
   end Solubility_Suite;
 
@@ -261,7 +262,6 @@ private
     function Get_Walkthrough(Problem: in out Titration_Curve_Problem; Walkthrough: out Walkthrough_Info.Map) return RetCode;
     procedure New_Problem(Problem: in out Titration_Curve_Problem);
     function Set_Parameters(Problem: in out Titration_Curve_Problem; Parameters: in Parameters_Info.Map) return RetCode;
-    overriding procedure Finalize(Problem: in out Titration_Curve_Problem);
 
   private
     Math_Limitation: exception;
index fc7df852eff5d579c0375efe60ffe33951fad8dd..d7788b7db105edbaef22b66015b118f885d3b787 100644 (file)
@@ -30,6 +30,8 @@ package Problem_Generator_Syswides is
     RESERVED_PROBLEM_ID_VAL_KEY: constant String := "RESERVED__PROBLEM_ID_VAL";
   RESERVED_PROBLEM_CATEGORY_KEY: constant String := "RESERVED__PROBLEM_CATEGORY";
     RESERVED_PROBLEM_CATEGORY_VAL_KEY: constant String := "RESERVED__PROBLEM_CATEGORY_VAL";
+  --
+  WT_FINAL_RESULT_KEY: constant String := "WT_FINAL_RESULT";
 
   package Acidobazic_Suite is
     -- What effect to ignore in calculations?
@@ -59,7 +61,6 @@ package Problem_Generator_Syswides is
     WT_DISSOC_CALCULATION_KEY: constant String := "WT_DISSOC_CALCULATION";
     WT_DISSOC_CORR_FORMULA_KEY: constant String := "WT_DISSOC_CORR_FORMULA";
     WT_DISSOC_CORR_RESULT_KEY: constant String := "WT_DISSOC_CORR_RESULT";
-    WT_FINAL_RESULT_KEY: constant String := "WT_FINAL_RESULT";
     WT_IGN_ATPR_FORMULA_KEY: constant String := "WT_IGN_ATPR_FORMULA";
     WT_IGN_ATPR_RESULT_KEY: constant String := "WT_IGN_ATPR_RESULT";
     WT_IGN_CONCLUSION_KEY: constant String := "IGN_CONCLUSION";
@@ -99,8 +100,7 @@ package Problem_Generator_Syswides is
     --
     FILLIN_ANSWER_KEY: constant String := "FILLIN_ANSWER";
     --
-    WT_ANSWER_RESULT_KEY: constant String := "WT_ANSWER_RESULT_KEY";
-    WT_V_DISS_C_RESULT_KEY: constant String := "WT_V_DISS_C_RESULT_KEY"; 
+    WT_V_DISS_C_RESULT_KEY: constant String := "WT_V_DISS_C_RESULT"; 
     WT_V_PLUG_C_RESULT_KEY: constant String := "WT_V_PLUG_C_RESULT";
     WT_V_PLUG_VOLUME_RESULT_KEY: constant String := "WT_V_PLUG_VOLUME_RESULT";
     WT_V_PRE_RADEX_RESULT_KEY: constant String := "WT_V_PRE_RADEX_RESULT";