|
1 | 1 | # CODE RUNNER
|
2 | 2 |
|
3 |
| -Version: 3.7.0 August 2019 |
| 3 | +Version: 3.7.1 October 2019 |
4 | 4 |
|
5 | 5 | Authors: Richard Lobb, University of Canterbury, New Zealand.
|
6 | 6 | Tim Hunt, The Open University, UK
|
@@ -1927,8 +1927,54 @@ itself the empty string.
|
1927 | 1927 | An example of the use of this UI type can be seen in the
|
1928 | 1928 | *python3_program_testing* prototype in the *samples* folder.
|
1929 | 1929 |
|
| 1930 | +### The Gap Filler UI (new, experimental) |
1930 | 1931 |
|
1931 |
| -### The Html UI |
| 1932 | +This plugin replaces the usual textarea answer box with a div |
| 1933 | +consisting of pre-formatted text supplied by the question author in either the |
| 1934 | +"globalextra" field or the testcode field of the first test case, according |
| 1935 | +to the template parameter gapfiller_ui_source (default: globalextra). HTML |
| 1936 | +entry or textarea elements are then inserted at |
| 1937 | +specified points. It is intended primarily for use with coding questions |
| 1938 | +where the answerbox presents the students with code that has smallish bits |
| 1939 | +missing. |
| 1940 | +
|
| 1941 | +The locations within the globalextra text at which the input elements are |
| 1942 | +to be inserted are denoted by "tags" of the form |
| 1943 | +
|
| 1944 | + {[ size ]} |
| 1945 | +
|
| 1946 | +for an HTML input element |
| 1947 | +
|
| 1948 | +or |
| 1949 | +
|
| 1950 | + {[ rows, columns ]} |
| 1951 | +
|
| 1952 | +for a textarea element |
| 1953 | +
|
| 1954 | +where size, rows and column are integer literals. These respectively |
| 1955 | +inject an HTML input element or a textarea element of the |
| 1956 | +specified size. |
| 1957 | +
|
| 1958 | +The serialisation of the answer box contents, i.e. the text that |
| 1959 | +copied back into the textarea for submissions |
| 1960 | +as the answer, is simply a list of all the field values (strings), in order. |
| 1961 | +
|
| 1962 | +As a special case of the serialisation, if the value list is empty, the |
| 1963 | +serialisation itself is the empty string. |
| 1964 | +
|
| 1965 | +The delimiters for the input element insertion tags are by default '{[' and |
| 1966 | +']}', but can be changed by an optional template parameter gap_filler_delimiters, |
| 1967 | +which must be a 2-element array of strings. For example: |
| 1968 | +
|
| 1969 | + {"gap_filler_delimiters": ["{{", "}}"]} |
| 1970 | +
|
| 1971 | +Note that the double-brace delimiters in that example are the same as those |
| 1972 | +used by Twig, so using them instead of the default would prevent you from |
| 1973 | +ever adding Twig expansion (e.g. for randomisation) to the question. This is |
| 1974 | +not recommended. |
| 1975 | +
|
| 1976 | +
|
| 1977 | +### The Html UI (unsupported and experimental) |
1932 | 1978 |
|
1933 | 1979 | The HTML UI plug-in replaces the answer box with custom HTML provided by the
|
1934 | 1980 | question author. The HTML will usually include data entry fields such as
|
|
0 commit comments