JuliaTutor

JuliaTutor.LessonMethod
Lesson(prompt::String, request::String, parser::Evaluator)

Will create a Lesson instance without a hint. Note: it is strongly preferred that Lesson's contain hints so please construct via Lesson( prompt::String, request::String, parser::Evaluator, hint::String ) except when neccesary.

source
JuliaTutor.TutorMethod
( t::Tutor )( user_input::String )

This is the parser, and lesson plan orchestration mechanism of Julia tutor. This functor progresses the user through lessons and parsers their inputs.

source
JuliaTutor.display_hintMethod
display_hint(t::Tutor)

Displays a hint pertaining to the users current lesson, if it exists. See hint(lesson::Lesson)

source
JuliaTutor.evaluateMethod
evaluate(ui, truth)::Tuple{ Bool, Bool }

Evaluates the output of a user's input against ground truth, and the variable declaration.

source
JuliaTutor.evaluateMethod
evaluate(ui, truth)::Tuple{ Bool, Bool }

Evaluates the output of a user's input against ground truth.

source
JuliaTutor.hintMethod
hint(lesson::Lesson)

Displays a hint for the user, if the lesson provides it. Otherwise - it directs the user to Discourse.

source
JuliaTutor.informMethod
inform(lesson::Lesson)

A convenience function to display the prompt of a lesson to an end user.

source
JuliaTutor.keywordsMethod
keywords(t, user_input)

Assesses if the user has asked for help, hint, or some other invention specific to JuliaTutor.

source
JuliaTutor.load_lessonMethod
load_lesson(lesson_location::String)

reads a structured Lesson file and begins a Julia tutor REPL, parser, etc.

source
JuliaTutor.menuMethod
menu()

Greets an end user, but then prompts them to select a lesson plan from /Lessons/ Once a lesson is selected(by entering a numerical value) it will load that lesson and begin.

source
JuliaTutor.requestMethod
request(lesson::Lesson)

A convenience function to display what action is requested for an end user to accomplish.

source
JuliaTutor.user_experienceMethod
user_experience(syntax_error, incorrect_answer)::Bool

Convenience function to handle the feedback a user see's when they enter invalid, incorrect, or correct code. Returns a bool as to whether their input was correct (true) or not (false).

source
JuliaTutor.@capture_stdstreamsMacro
@capture_stdstreams(expr)

Evaluate the specified expression and return a (stdout, stderr) tuple. This macro will attempt to capture every form of output, including via the Logging module (e.g. the @logmsg and friend macros), but it's unable to do this with perfect accuracy. Any code that stores a reference to stdout or stderr before this is executed will retain those references to the original streams. For example, the original log instance may be obtained using Logging.global_logger() because no attempt is made to set the global logger instance.

Examples

julia> out, err = ComparativeAutograder.@capture_stdstreams begin
           println("I'm going to out!")
           println(stderr, "I'm going to err!")
       end
("I'm going to out!\n", "I'm going to err!\n")
source