Problems_web.Beta_reduction_controllerinclude Controller_intf.Sinclude Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareval sexp_of_settings_action : settings_action -> Sexplib0.Sexp.tval settings_action_of_sexp : Sexplib0.Sexp.t -> settings_actionval init : unit -> tGet an controler that will be used to show the first problem.
val problem : t -> stringGet the text of the current problem.
val description : t -> stringDescription to show above the problem.
val should_submit : t -> string -> boolChecks whether the problem should submit given the current text in the input. This function will often check for a newline character to see if the user has clicked the enter button. If should_submit returns true, leading and trailing whitespace will be removed from the input.
val submit : t -> string -> (string, string) Core.resultSubmit the answer to the current problem. If the returned result is Ok s then the string s will be displayed in green text. If Error s is returned s will be displayed in red text.
val on_tab : t -> Js_of_ocaml.Dom_html.textAreaElement Js_of_ocaml.Js.t -> unitThis function is called whenever the user clicks the tab button while the input box is focused. This allows you to perform actions and modifications to the contents of the text box.
val settings : t -> settings_action Controller_intf.settings listThe settings associated with this controller.
val update_settings : t -> settings_action -> tUpdates a setting in the controller.