]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Add hints for titration curve
authorMichal Malý <madcatxster@devoid-pointer.net>
Tue, 16 Dec 2014 01:29:15 +0000 (02:29 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Tue, 16 Dec 2014 01:29:15 +0000 (02:29 +0100)
20 files changed:
bin/images/tc_ac_first_equiv.png [new file with mode: 0644]
bin/images/tc_ac_first_half_A.png [new file with mode: 0644]
bin/images/tc_ac_first_half_B.png [new file with mode: 0644]
bin/images/tc_ac_over.png [new file with mode: 0644]
bin/images/tc_ac_second_equiv.png [new file with mode: 0644]
bin/images/tc_ac_second_half_A.png [new file with mode: 0644]
bin/images/tc_ac_second_half_B.png [new file with mode: 0644]
bin/images/tc_ac_start.png [new file with mode: 0644]
bin/images/tc_ba_first_equiv.png [new file with mode: 0644]
bin/images/tc_ba_first_half_A.png [new file with mode: 0644]
bin/images/tc_ba_first_half_B.png [new file with mode: 0644]
bin/images/tc_ba_over.png [new file with mode: 0644]
bin/images/tc_ba_second_equiv.png [new file with mode: 0644]
bin/images/tc_ba_second_half_A.png [new file with mode: 0644]
bin/images/tc_ba_second_half_B.png [new file with mode: 0644]
bin/images/tc_ba_start.png [new file with mode: 0644]
bin/templates/titration_curve_hints_acid.html [new file with mode: 0644]
bin/templates/titration_curve_hints_base.html [new file with mode: 0644]
src/face_generators/face_generator.adb
src/problem_generators/problem_generator_syswides.ads

diff --git a/bin/images/tc_ac_first_equiv.png b/bin/images/tc_ac_first_equiv.png
new file mode 100644 (file)
index 0000000..09565ba
Binary files /dev/null and b/bin/images/tc_ac_first_equiv.png differ
diff --git a/bin/images/tc_ac_first_half_A.png b/bin/images/tc_ac_first_half_A.png
new file mode 100644 (file)
index 0000000..1482c01
Binary files /dev/null and b/bin/images/tc_ac_first_half_A.png differ
diff --git a/bin/images/tc_ac_first_half_B.png b/bin/images/tc_ac_first_half_B.png
new file mode 100644 (file)
index 0000000..47157b5
Binary files /dev/null and b/bin/images/tc_ac_first_half_B.png differ
diff --git a/bin/images/tc_ac_over.png b/bin/images/tc_ac_over.png
new file mode 100644 (file)
index 0000000..532d6f0
Binary files /dev/null and b/bin/images/tc_ac_over.png differ
diff --git a/bin/images/tc_ac_second_equiv.png b/bin/images/tc_ac_second_equiv.png
new file mode 100644 (file)
index 0000000..ee60574
Binary files /dev/null and b/bin/images/tc_ac_second_equiv.png differ
diff --git a/bin/images/tc_ac_second_half_A.png b/bin/images/tc_ac_second_half_A.png
new file mode 100644 (file)
index 0000000..9856515
Binary files /dev/null and b/bin/images/tc_ac_second_half_A.png differ
diff --git a/bin/images/tc_ac_second_half_B.png b/bin/images/tc_ac_second_half_B.png
new file mode 100644 (file)
index 0000000..2b91eab
Binary files /dev/null and b/bin/images/tc_ac_second_half_B.png differ
diff --git a/bin/images/tc_ac_start.png b/bin/images/tc_ac_start.png
new file mode 100644 (file)
index 0000000..851d115
Binary files /dev/null and b/bin/images/tc_ac_start.png differ
diff --git a/bin/images/tc_ba_first_equiv.png b/bin/images/tc_ba_first_equiv.png
new file mode 100644 (file)
index 0000000..28f6ab1
Binary files /dev/null and b/bin/images/tc_ba_first_equiv.png differ
diff --git a/bin/images/tc_ba_first_half_A.png b/bin/images/tc_ba_first_half_A.png
new file mode 100644 (file)
index 0000000..b4e362f
Binary files /dev/null and b/bin/images/tc_ba_first_half_A.png differ
diff --git a/bin/images/tc_ba_first_half_B.png b/bin/images/tc_ba_first_half_B.png
new file mode 100644 (file)
index 0000000..30e4bb2
Binary files /dev/null and b/bin/images/tc_ba_first_half_B.png differ
diff --git a/bin/images/tc_ba_over.png b/bin/images/tc_ba_over.png
new file mode 100644 (file)
index 0000000..ca51b36
Binary files /dev/null and b/bin/images/tc_ba_over.png differ
diff --git a/bin/images/tc_ba_second_equiv.png b/bin/images/tc_ba_second_equiv.png
new file mode 100644 (file)
index 0000000..4a9d475
Binary files /dev/null and b/bin/images/tc_ba_second_equiv.png differ
diff --git a/bin/images/tc_ba_second_half_A.png b/bin/images/tc_ba_second_half_A.png
new file mode 100644 (file)
index 0000000..8ca3ca1
Binary files /dev/null and b/bin/images/tc_ba_second_half_A.png differ
diff --git a/bin/images/tc_ba_second_half_B.png b/bin/images/tc_ba_second_half_B.png
new file mode 100644 (file)
index 0000000..374d8f0
Binary files /dev/null and b/bin/images/tc_ba_second_half_B.png differ
diff --git a/bin/images/tc_ba_start.png b/bin/images/tc_ba_start.png
new file mode 100644 (file)
index 0000000..1449a99
Binary files /dev/null and b/bin/images/tc_ba_start.png differ
diff --git a/bin/templates/titration_curve_hints_acid.html b/bin/templates/titration_curve_hints_acid.html
new file mode 100644 (file)
index 0000000..6a165c3
--- /dev/null
@@ -0,0 +1,41 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           pH na počátku titrace:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_start.png" alt="pH na počátku titrace" />
+          
+          <div class="hint_caption">
+           pH v polovině první ekvivalence:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_first_half_A.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           Koncentrace obou forem je rovná, takže:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_first_half_B.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           pH v první ekvivalenci:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_first_equiv.png" alt="pH v první ekvivalenci" />
+
+          <div class="hint_caption">
+           pH v polovině druhé ekvivalence:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_second_half_A.png" alt="pH v první ekvivalenci" />
+
+          <div class="hint_caption">
+           Koncentrace obou forem je opět rovná, takže:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_second_half_B.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           pH v druhé ekvivalenci:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_second_equiv.png" alt="pH v druhé ekvivalenci" />
+
+          <div class="hint_caption">
+           pH v druhé nadbytku:
+          </div>
+          <img class="math_formula" src="/images/tc_ac_over.png" alt="pH v druhé nadbytku" />
+        </div>
diff --git a/bin/templates/titration_curve_hints_base.html b/bin/templates/titration_curve_hints_base.html
new file mode 100644 (file)
index 0000000..4847c75
--- /dev/null
@@ -0,0 +1,41 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           pH na počátku titrace:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_start.png" alt="pH na počátku titrace" />
+          
+          <div class="hint_caption">
+           pH v polovině první ekvivalence:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_first_half_A.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           Koncentrace obou forem je rovná, takže:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_first_half_B.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           pH v první ekvivalenci:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_first_equiv.png" alt="pH v první ekvivalenci" />
+
+          <div class="hint_caption">
+           pH v polovině druhé ekvivalence:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_second_half_A.png" alt="pH v první ekvivalenci" />
+
+          <div class="hint_caption">
+           Koncentrace obou forem je opět rovná, takže:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_second_half_B.png" alt="pH v polovině první ekvivalence" />
+
+          <div class="hint_caption">
+           pH v druhé ekvivalenci:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_second_equiv.png" alt="pH v druhé ekvivalenci" />
+
+          <div class="hint_caption">
+           pH v druhé nadbytku:
+          </div>
+          <img class="math_formula" src="/images/tc_ba_over.png" alt="pH v druhé nadbytku" />
+        </div>
index cac0ea3170e9a00bbe1eee94fff3cacd9111db90..21301d536a4dba21a577a07dc4ce549c69aba97b 100644 (file)
@@ -429,6 +429,13 @@ package body Face_Generator is
     Insert(Translations, Assoc(Titration_Curve_Suite.ANSWER_PH_OVER_SECOND_EQUIV_KEY, Titration_Curve_Suite.ANSWER_PH_OVER_SECOND_EQUIV_KEY));
     Insert(Translations, Assoc(Titration_Curve_Suite.ANSWER_VOLUME_OVER_SECOND_EQUIV_KEY, Titration_Curve_Suite.ANSWER_VOLUME_OVER_SECOND_EQUIV_KEY));
 
+    if Assignment.Element(Titration_Curve_Suite.SAMPLE_TYPE_KEY) = Titration_Curve_Suite.SAMPLE_TYPE_ACID then
+      Temp := Parse(Filename => "templates/titration_curve_hints_acid.html", Cached => True);
+    else
+      Temp := Parse(Filename => "templates/titration_curve_hints_base.html", Cached => True);
+    end if;
+    Insert(Translations, Assoc(HINTS_SECTION_KEY, HTML_To_Fixed_String(Temp)));
+
     case Answer_Code is
       when Correct_Answer =>
        Insert(Translations_Answer, Assoc(ANSWER_KIND_KEY, ANSWER_KIND_GOOD));
index 9caa4ada8cabe61872bf964d9f40c07529be7a54..002a9089f9bd27859262ea0dc8042395e0328631 100644 (file)
@@ -86,7 +86,7 @@ package Problem_Generator_Syswides is
 
     PROBLEM_NAME_READABLE: constant String := "Titrační křivka";
     SAMPLE_TYPE_KEY: constant String := "SAMPLE_TYPE";
-      SAMPLE_TYPE_ACID: constant String := "kyselina";
+      SAMPLE_TYPE_ACID: constant String := "kyseliny";
       SAMPLE_TYPE_BASE: constant String := "báze";
     --
     --