← 수업 제작 도구
홈 › Components › Math Response (수식 답변) › 화면 12

화면 12. Math Input.errorMessage [sink]

원본: Computation Layer 문서(Math Response (수식 답변)) · Try It (원본 화면)

화면 번호12 / 28
문서 항목 설명 (원문)errorMessage An error to show to the student. Note: This will not show up in the teacher dashboard. (Use the "warning" sink to show warnings to the teacher.)

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 12 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1fractionChecker수식 답변
# Displays an error message to the student if they type
# an answer that isn't a defined value.
▷ 학생이 정의되지 않은 값을 입력하면 오류 메시지를 보여 준다.

errorMessage:
	when isUndefined(this.numericValue) "You have to type a valid number."
    otherwise ""
▶ 수식 답변의 오류 메시지(errorMessage)는 이 입력의 계산한 값이 정의되지 않았으면(isUndefined(this.numericValue)) "You have to type a valid number."(올바른 숫자를 입력해야 한다.), 그렇지 않으면 빈 글자로 한다.
errorMessage는 학생에게 보여 줄 오류 글자를 정하며 교사 대시보드에는 나타나지 않는다. this는 이 구성요소이다. isUndefined(…)는 값이 정의되지 않았는지를 참/거짓으로 돌려주는 함수이고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.