|
66 | 66 |
|
67 | 67 | log = logging.getLogger(__name__) |
68 | 68 |
|
69 | | -######################################################################### |
70 | | - |
71 | 69 | registry = TagRegistry() # pylint: disable=invalid-name |
72 | 70 |
|
73 | 71 |
|
@@ -408,7 +406,7 @@ class OptionInput(InputTypeBase): |
408 | 406 |
|
409 | 407 | Example: |
410 | 408 |
|
411 | | - <optioninput options="('Up','Down')" correct="Up"/><text>The location of the sky</text> |
| 409 | + <optioninput options="('Up', 'Down')" correct="Up"/><text>The location of the sky</text> |
412 | 410 |
|
413 | 411 | # TODO: allow ordering to be randomized |
414 | 412 | """ |
@@ -505,7 +503,7 @@ def setup(self): |
505 | 503 | raise Exception(msg) |
506 | 504 |
|
507 | 505 | self.choices = self.extract_choices(self.xml, i18n) |
508 | | - self._choices_map = dict(self.choices,) |
| 506 | + self._choices_map = dict(self.choices, ) |
509 | 507 |
|
510 | 508 | @classmethod |
511 | 509 | def get_attributes(cls): |
@@ -602,16 +600,16 @@ def get_attributes(cls): |
602 | 600 | Register the attributes. |
603 | 601 | """ |
604 | 602 | return [ |
605 | | - Attribute('params', None), # extra iframe params |
| 603 | + Attribute('params', None), # extra iframe params |
606 | 604 | Attribute('html_file', None), |
607 | 605 | Attribute('gradefn', "gradefn"), |
608 | 606 | Attribute('get_statefn', None), # Function to call in iframe |
609 | | - # to get current state. |
| 607 | + # to get current state. |
610 | 608 | Attribute('initial_state', None), # JSON string to be used as initial state |
611 | 609 | Attribute('set_statefn', None), # Function to call iframe to |
612 | | - # set state |
613 | | - Attribute('width', "400"), # iframe width |
614 | | - Attribute('height', "300"), # iframe height |
| 610 | + # set state |
| 611 | + Attribute('width', "400"), # iframe width |
| 612 | + Attribute('height', "300"), # iframe height |
615 | 613 | # Title for the iframe, which should be supplied by the author of the problem. Not translated |
616 | 614 | # because we are in a class method and therefore do not have access to capa_system.i18n. |
617 | 615 | # Note that the default "display name" for the problem is also not translated. |
@@ -1626,7 +1624,7 @@ class ChoiceTextGroup(InputTypeBase): |
1626 | 1624 | CheckboxProblem: |
1627 | 1625 | <problem> |
1628 | 1626 | <startouttext/> |
1629 | | - A person randomly selects 100 times, with replacement, from the list of numbers \(\sqrt{2}\) , 2, 3, 4 ,5 ,6 |
| 1627 | + A person randomly selects 100 times, with replacement, from the list of numbers \(\sqrt{2}\), 2, 3, 4, 5, 6 |
1630 | 1628 | and records the results. The first number they pick is \(\sqrt{2}\) Given this information |
1631 | 1629 | select the correct choices and fill in numbers to make them accurate. |
1632 | 1630 | <endouttext/> |
|
0 commit comments