Class: BlockPyFeedback

BlockPyFeedback

new BlockPyFeedback(main, tag)

An object that manages the feedback area, where users are told the state of their program's execution and given guidance. Also manages the creation of the Trace Table.
This:
Parameters:
Name Type Description
main Object The main BlockPy instance
tag HTMLElement The HTML object this is attached to.
Source:

Methods

buildTraceTable()

Reload the trace table, showing it if it was hidden and resetting its position to the last step.
Source:

clear()

Clears any output currently in the feedback area. Also resets the printer and any highlighted lines in the editor.
Source:

clearEditorErrors()

Clears any errors from the editor area.
Source:

complete()

Mark this problem as completed for the student. This will appear in the Feedback area, and will also unhighlight lines in the editor and log to the server.
Source:

editorError(original, message, line)

Show an error message related to a problem with the editor. This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source:

emptyProgram(original, message, line)

Show "Empty Program" error, indicating the student hasn't written any code. This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source:

error(html)

Raises a generic warning. This might not be used anymore.
Parameters:
Name Type Description
html String Some HTML content to render to the user.
Source:

finished()

Mark this problem as finished for the student. This will appear in the Feedback area, and will also unhighlight lines in the editor and log to the server.
Source:

instructorFeedback(original, message, line)

Show an incorrect code message related to a problem as specified by the Checker. This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source:

internalError(original, message, line)

Show an error message related to a serious internal BlockPy program. Under normal conditions, this should never appear to a student. This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source:

noErrors()

This notifies the student that their code ran without errors, but that there was no Success raised by the Checker. This will appear in the Feedback area, and will also unhighlight lines in the editor and log to the server.
Source:

prettyPrintError()

Converts any kind of error (usually a Skulpt one) into a prettier version that's ready for users to see. If it's already a string, it is passed along unchanged. But Skulpt errors have to be processed more closely.
Source:

printError(error)

Print an error to the printers -- the on screen one and the browser one. This will attempt to provide extra explanation and context for an error. Notice that this is largely for Run-time errors that will be thrown when the code is executed, as opposed to ones raised elsewhere in the environment.
Parameters:
Name Type Description
error String The error message to be analyzed and printed.
Source:

semanticError(original, message, line)

Show an error message related to semantic error with the program (e.g., unused variable). This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source:

syntaxError(original, message, line)

Show an error message related to syntax issue. This will appear in the Feedback area, the Printer, and also log to the server. The relevant line of code or block will also be highlighted.
Parameters:
Name Type Description
original String HTML content that represents the original error message generated by the system.
message String HTML content that is a hopefully friendlier message for the user explaining the error.
line number What line the error occurred on.
Source: