in2lambda.api.response_area.Images¶

class in2lambda.api.response_area.Images(*, answer: Any = None, evaluation_function: str = <default>, grade_params: dict[str, ~typing.Any] | None=None, pre_text: str = '', post_text: str = '', content_after: str = '', check_button_text: str = '', input_symbols: list[InputSymbol] = <factory>, display_input_symbols: bool = <default>, live_preview: bool = <default>, include_in_pdf: bool = <default>, save_allowed: bool = <default>, separate_feedback: bool = <default>, common_feedback_color: str = <default>, correct_feedback_color: str = <default>, correct_feedback_prefix: str = <default>, incorrect_feedback_color: str = <default>, incorrect_feedback_prefix: str = <default>, tests: list[Test] = <factory>, accept: list[Any] = <factory>, reject: list[Any] = <factory>, cases: list[Case] = <factory>, max_images: int = <default>, allowed_types: list[str] = <default>, max_size_mb: int = <default>, resize_max_side: int = <default>)[source]¶

Bases: ResponseArea

Upload images.

__init__(*, answer: Any = None, evaluation_function: str = <default>, grade_params: dict[str, ~typing.Any] | None=None, pre_text: str = '', post_text: str = '', content_after: str = '', check_button_text: str = '', input_symbols: list[InputSymbol] = <factory>, display_input_symbols: bool = <default>, live_preview: bool = <default>, include_in_pdf: bool = <default>, save_allowed: bool = <default>, separate_feedback: bool = <default>, common_feedback_color: str = <default>, correct_feedback_color: str = <default>, correct_feedback_prefix: str = <default>, incorrect_feedback_color: str = <default>, incorrect_feedback_prefix: str = <default>, tests: list[Test] = <factory>, accept: list[Any] = <factory>, reject: list[Any] = <factory>, cases: list[Case] = <factory>, max_images: int = <default>, allowed_types: list[str] = <default>, max_size_mb: int = <default>, resize_max_side: int = <default>) → None¶

Methods

__init__(*, answer, evaluation_function, ...)

Attributes

allowed_types

answer

check_button_text

Replaces the label of the check button; left out of the JSON when empty.

common_feedback_color

content_after

Markdown shown after the box, before the next one.

correct_feedback_color

correct_feedback_prefix

display_input_symbols

evaluation_function

grade_params

include_in_pdf

incorrect_feedback_color

incorrect_feedback_prefix

live_preview

max_images

max_size_mb

payload_types

The types a test payload, a sample response, may take.

post_text

pre_text

resize_max_side

The longest side images are resized to; 0 leaves them as they are.

response_type

save_allowed

separate_feedback

input_symbols

tests

accept

Responses that must be marked correct; each is written as a passing test.

reject

Responses that must be marked incorrect; each is written as a failing test.

cases

accept: list[Any]¶

Responses that must be marked correct; each is written as a passing test.

check_button_text: str = ''¶

Replaces the label of the check button; left out of the JSON when empty.

content_after: str = ''¶

Markdown shown after the box, before the next one.

payload_types: ClassVar[tuple[type, ...]] = (<class 'object'>,)¶

The types a test payload, a sample response, may take.

reject: list[Any]¶

Responses that must be marked incorrect; each is written as a failing test.

resize_max_side: int = <default>¶

The longest side images are resized to; 0 leaves them as they are.