def _help_panel(cls): if cls._BUTTONS: return (lcg.p(_("The control panel below the exercise contains the following " "buttons:")), lcg.dl([(label, hlp) for label, t, name, hlp in cls._BUTTONS])) else: return None
def _result_item(self, item): sample = item.sample() link = lcg.link(item.uri(), label=item.title(), descr=sample,) if sample is None: result_item = lcg.p((link,)) else: result_item = lcg.dl(((link, sample),)) return result_item
def _result_item(self, item): sample = item.sample() link = lcg.link( item.uri(), label=item.title(), descr=sample, ) if sample is None: result_item = lcg.p((link, )) else: result_item = lcg.dl(((link, sample), )) return result_item
def _help_keys(cls): return (lcg.p(_("In all the exercises where you fill in the text into a text box " "you can use the two shortcut keys described below.")), lcg.dl(((_("Enter"), _("Use this key within the text field to evaluate the current answer. " "You hear a sound response and in case of an error, the cursor is " "moved to the position of the first incorrect character within the " "text. This way you can locate the error, fix it and evaluate again. " u"When you don't know how to fix an error, you can use the ‘hint’ " "key described below.")), (_("Ctrl-Space"), _(u"This function is called a ‘hint’. It helps you in case you don't " "know the answer or you don't know how to fix an error in your answer. " "Just press the key combination (holding the Ctrl key, press the " "spacebar) and one letter of the correct answer will be filled in " "automatically. If you have already entered some text, the cursor " "will be moved to after the last correct character and next one will " "be inserted. This also means that if there is some text after the " "cursor, there is at least one error in it. Try to locate this error " "and correct it. Then you can evaluate your answer using the " u"‘Enter’ key (see above) or use ‘hint’ again, until you find the " "complete answer.")))),)
def _help_keys(cls): return (lcg.p(_("In all the exercises where you fill in the text into a text-box " "you can use the two shortcut keys described below.")), lcg.dl(((_("Enter"), _("Use this key within the text-field to evaluate the current answer. " "You hear a sound response and in case of an error, the cursor is " "moved to the position of the first incorrect character within the " "text. This way you can locate the error, fix it and evaluate again. " u"When you don't know how to fix an error, you can use the ‘hint’ " "key described below.")), (_("Ctrl-Space"), _(u"This function is called a ‘hint’. It helps you in case you don't " "know the answer or you don't know how to fix an error in your answer. " "Just press the key combination (holding the Ctrl key, press the " "spacebar) and one letter of the correct answer will be filled in " "automatically. If you have already entered some text, the cursor " "will be moved to after the last correct character and next one will " "be inserted. This also means that if there is some text after the " "cursor, there is at least one error in it. Try to locate this error " "and correct it. Then you can evaluate your answer using the " u"‘Enter’ key (see above) or use ‘hint’ again, until you find the " "complete answer.")))),)
def _help_indicators(cls): if cls._INDICATORS: return (lcg.p(_("The indicator panel below the exercise shows the following values:")), lcg.dl([(label, help) for name, label, help in cls._INDICATORS])) else: return None