function get_others() { if ($this->others === NULL) { $t = $this->tense; if (ISPICK($t)) { $t = $t->rand(); } $this->others = make_chart($this->word, [[$t], ["singular", "plural"], ["person-1", "person-2", "person-3"], ["active", "passive"], [FALSE]], ["infinitive/imperfect", "infinitive/future-perfect", "infinitive/pluperfect", "subjunctive/future", "subjunctive/future-perfect", "infinitive/future/passive"], "the " . format_path($t), NULL, $this->translation); } return $this->others; }
return "subjunctive"; } return "indicative"; }], "choices0-tooltip" => "Which mood?", "choices0-language" => "en"]]], "subjunctive-infinitives" => ["name" => "Subjunctive practice", "category" => "Grammar", "lang" => "la", "stage" => 24, "options" => function () { global $OP_USER_INPUT; return [["help" => function (&$pick_db, $db) { $word = $pick_db["word"]; $pick_db["word"]->read_paths(); $path = $pick_db["path"] = PATH($word); foreach ($pick_db as $k => $v) { if ($k === "word" or $k === "path") { continue; } #error_log("$k = $v".var_export($v,true)); $path->add2($v); } #error_log(var_export($path->get(),1)); $pick_db["form"] = $path->get(); $path = implode(" ", array_map("format_path", array_reverse(explode("/", (string) $path)))); $word_name = display_word_name($word); return "What is the {$path} for {$word_name}."; }, "selections" => ["word" => function ($_, $db, $path) { $s = $db->searcher()->spart("verb")->only_without_attr(ATTR("irregular"))->only_without_attr(ATTR("template")); $s->stmt .= " AND EXISTS (SELECT 1 FROM forms WHERE forms.word_id = words.word_id AND form_tag != '' AND form_value != '') AND NOT EXISTS (SELECT 1 FROM attributes WHERE attr_tag = 'conjugation' AND attr_value like '%deponent%' AND word_id = words.word_id)"; return $s->rand(); }, "tense" => PICK(["imperfect", "pluperfect"]), "mood" => PICK(["indicative", "indicative", "indicative", "subjunctive", "subjunctive", "subjunctive", "subjunctive", "subjunctive"]), "number" => PICK(["singular", "plural"]), "person" => "person-3", "voice" => "active"], "sentence" => [$OP_USER_INPUT], "answer0" => function ($pick_db) { return array_map("format_word", explode("\n", $pick_db["form"])); }, "answer0-tooltip" => "Enter form"], make_chart(RWORD2("la", "verb"), null, ["participle", "infinitive", "supine", "imperative", "passive", "person-1", "person-2", "present", "perfect", "future", "future-perfect"])]; }], "013" => ["name" => "Subjunctive matching", "lang" => "la", "category" => "Grammar", "n_questions" => 1, "options" => function () { return [make_matching(["Pluperfect Subjunctive" => "portāvisset", "Pluperfect Indicative" => "discēderat", "Imperfect Indicative" => "veniēbat", "Imperfect Subjunctive" => "prōmitteret"])]; }]]);