Create Virtual Classrooms and Features Overview

Before you create a new virtual classroom, you need to prepare a learning activity (Ref: Setup Learning Activities (Upload Learning Materials)) and a grouping template (Ref: Setup Grouping Templates).

Tasting UnaGPT as Teachers – Setup and Distribute AI Exercises

This documentation guides teachers on setting up AI exercises using UnaGPT, covering activity creation, task configuration, virtual classroom setup, student monitoring, and reviewing AI-generated feedback. Free Trial Registration The following instructions are suitable for users who have applied for a free trial of UnaGPT. Teachers are welcome to apply or...

Tasting UnaGPT as Students – Submit Answers and Get AI Feedback

This documentation guides students on using UnaGPT for submitting tasks, receiving AI-generated grades and feedback, and filing appeals on the Una platform. Free Trial Registration The following instructions are suitable for users who have applied for a free trial of UnaGPT. Teachers are welcome to apply or contact us for...

Teachable Machine

This documentation details using Teachable Machine for image and pose classification, including model loading, object classification, label display, skeleton drawing, and converting results to JSON. Image Loading Custom Image Model from URL Load image model from internet {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>duration</variable></variables><block type=\"TeachableMachine_loadImageModel\" disabled=\"true\" x=\"-23\" y=\"112\"><value name=\"baseUrl\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This is used...

DateTime

This documentation covers operations and conversions involving DateTimeOffset and Duration, including formatting, calculations, type checking, and transformations between text, numbers, and various units. DateTimeOffset Converting Text to DateTimeOffset Format Pause to DateTimeOffset {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>jsonValue</variable></variables><block type=\"DateTime_parseDateTimeOffset\" disabled=\"true\" x=\"-22\" y=\"112\"><value name=\"s\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This block is used to analyze the text...

JSON

This documentation details operations and conversions involving JSON values, including construction, data type validation, translation to arrays, and object manipulation within the JSON format. JsonValue Construction Translating the Screen Item to JsonValue Convert to JsonValue {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Json_toJsonValue\" disabled=\"true\" x=\"-22\" y=\"112\"/></xml>"} This is used to convent the Screen Item to...

Text

This documentation covers various text manipulation techniques, including transforming text to numbers, concatenation, length checking, setting and breaking text, character searches, substring displays, and character code usage. Transforming Text to Number Parse to number {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"string_parsefloat\" disabled=\"true\" x=\"-22\" y=\"247\"><value name=\"text\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\">123</field></shadow></value></block></xml>"} This block is used to convert...

Arrays

The documentation covers essential array operations, including creation, reading, modification, and various operations such as finding locations, reversing, and inserting and deleting values at specific positions. Create Setting a number array Set list to array of {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>list</variable></variables><block type=\"variables_set\" disabled=\"true\" x=\"-23\" y=\"68\"><field name=\"VAR\">list</field><value name=\"VALUE\"><block type=\"lists_create_with\" disabled=\"true\"><mutation items=\"2\" horizontalafter=\"3\"/><value name=\"ADD0\"><shadow type=\"math_number\"...

Functions

The documentation provides guidance on returning a value from a function and calling a function, offering essential information for understanding and using functions in programming. Returning a Value Return {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"function_return\" disabled=\"true\" x=\"-23\" y=\"68\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" no_return_value=\"false\"></mutation><value name=\"RETURN_VALUE\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This block is used to return a value inside...

Resources

The documentation includes information on how to download online text and photos, as well as specific instructions for downloading a Una photo. Downloading Online Text Get text from internet {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Resources_getTextByURL\" disabled=\"true\" x=\"-22\" y=\"67\"><value name=\"url\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This block is used to get the text from online resources....

Math

This documentation covers fundamental math operations including addition, subtraction, multiplication, division, remainders, minimum and maximum values, square roots, rounding, absolute values, and generating random numbers. Adding/Subtracting/Multiplying/Dividing Two Values 0 + 0 {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>count</variable></variables><block type=\"math_arithmetic\" disabled=\"true\" x=\"67\" y=\"68\"><field name=\"OP\">ADD</field><value name=\"A\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value><value name=\"B\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This is used to...

Variables

This documentation explains how to change and modify the value of variables, providing guidance on variable manipulation techniques. Changing the Value of a Variable Set ... to {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>count</variable></variables><block type=\"variables_set\" disabled=\"true\" x=\"22\" y=\"202\"><field name=\"VAR\">count</field><value name=\"VALUE\"><shadow type=\"math_number\" disabled=\"true\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This block is used to set the variable to be same as...

Logic

This documentation covers logical operations including conditionals, comparisons, boolean logic, and actions based on true/false evaluations, such as continuing actions, handling equality, and dealing with always true or false scenarios. Conditionals Continue Steps If It is Correct If true then {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>index</variable></variables><block type=\"controls_if\" disabled=\"true\" x=\"23\" y=\"112\"><value name=\"IF0\"><shadow type=\"logic_boolean\" disabled=\"true\"><field name=\"BOOL\">TRUE</field></shadow></value></block></xml>"}...

Loops

This documentation covers various loop constructs including repeating actions, conditional loops, iterating from zero to a final value, looping over array lengths, terminating loops, and proceeding to the next action. Repeating Actions in Several Times Repeat times do {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"controls_repeat_ext\" disabled=\"true\" x=\"23\" y=\"67\"><value name=\"TIMES\"><shadow type=\"math_whole_number\" disabled=\"true\"><field name=\"NUM\">4</field></shadow></value></block></xml>"} This is...

Grove

This documentation covers Grove system functionalities, including digital and analog port operations, servo and motor control, sensor data reading, four-digit display management, and additional features like playing sound. Digital Get the port result Digital read port {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>photo</variable><variable>faceDetectionResult</variable></variables><block type=\"Grove_digitalRead\" disabled=\"true\" x=\"158\" y=\"293\"><field name=\"port\">GroveDigitalPort.D5</field></block></xml>"} This is used to get the value...

UnaAI

This documentation details UnaAI functionalities, including displaying AI results, object and face detection, face comparison, and identifying people based on attributes like hair color, glasses, gender, and emotions. Common Display the AI Result Print AI Result {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>result</variable></variables><block type=\"UnaAI_AiResult_showContent\" disabled=\"true\" x=\"113\" y=\"202\"><value name=\"result\"><block type=\"variables_get\" disabled=\"true\"><field name=\"VAR\">result</field></block></value></block></xml>"} This is used to...

Camera

This documentation outlines basic camera functionalities, including changing the camera direction, taking snapshots, and displaying photos. Change the Camera Direction Rotate photo clockwise by 90 degree {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Camera_rotatePhoto\" disabled=\"true\" x=\"158\" y=\"292\"><field name=\"direction\">RotationDirection.Clockwise</field><field name=\"degree\">RotationDegree.Ninety</field></block></xml>"} This is used to change the direction of the image or photo. Parameters: Image clockwise (Default)/anticlockwise 90...

Basic

This documentation covers basic programming tasks, including starting a program, pausing execution, and displaying numerical values and text. Program Starts On Start {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>visionAnalysisResult</variable><variable>result</variable><variable>photo1</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"/></xml>"} This is used to execute an event when the program starts. Parameters: N/A Output: N/ASample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>visionAnalysisResult</variable><variable>result</variable><variable>photo1</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"basic_consoleLogText\"><value name=\"text\"><shadow type=\"text\"><field...

DateTime

This documentation provides comprehensive details on handling DateTimeOffset and Duration, including conversions, formatting, calculations, modifications, and validation of DateTime data. DateTimeOffset Converting Text to DateTimeOffset Format Parse … to DateTimeOffset {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"DateTime_parseDateTimeOffset\"><value name=\"s\"><shadow type=\"text\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This block is used to analyze the text into DateTimeOffset.  Parameters: StringOutput: DateTimeOffsetSample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable><variable>dateTimeOffset</variable></variables><block...

Text

This documentation covers text manipulation, including setting, checking length, concatenation, conversion between text and numbers, substring operations, character positions, and using character codes. Basic Text Setting Text String {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"text\"><field name=\"TEXT\"/></block></xml>"} This block is used to set a letter or text inside the block.  Parameters: StringOutput: StringSample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable><variable>imageModel</variable><variable>downloadImage</variable><variable>predictionResult</variable><variable>resultItems</variable><variable>layout</variable></variables><block type=\"pxt-on-start\"...

Arrays

This documentation details array operations, including creation, reading, modifying values, and performing operations like finding locations, reversing, and managing array elements. Create Setting a number array Set list to array of {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"variables_set\"><field name=\"VAR\">list</field><value name=\"VALUE\"><block type=\"lists_create_with\"><mutation items=\"2\" horizontalafter=\"3\"/><value name=\"ADD0\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value><value name=\"ADD1\"><shadow type=\"math_number\"><field name=\"NUM\">1</field></shadow></value></block></value></block></xml>"} This block is used to...

Functions

This documentation explains functions, detailing how to return a value and call a function. Returning a Value Return {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"function_return\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" no_return_value=\"false\"></mutation><value name=\"RETURN_VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This block is used to return a value inside the function.  Parameters: Screen ItemOutput: N/ASample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable><variable>dateTimeOffset</variable></variables><block type=\"function_definition\" x=\"20\" y=\"305\"><mutation name=\"calculation\" functionid=\"O$xs+CBy0Ty=@dN;0n7q\"><arg name=\"num\" id=\"b1x9b17oeik0sacu18ayb\" type=\"number\"/><arg...

Download

This documentation covers methods for downloading online content, including videos, images, and files. Downloading Online Video Download … as video {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Download_video\"><value name=\"url\"><shadow type=\"text\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This block is used to download the video from internet.  Parameters: String (URL)Output: VideoSample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable><variable>video</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"variables_set\"><field name=\"VAR\">mainLayout</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow><block...

Math

This documentation explains basic math operations, including addition, subtraction, multiplication, division, setting and converting numbers, finding remainders, minimum and maximum values, absolute values, square roots, approximations, and generating random values. Adding/Subtracting/Multiplying Two Values 0 + 0 {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"math_arithmetic\"><field name=\"OP\">ADD</field><value name=\"A\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value><value name=\"B\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This is used to...

Variables

This document includes instructions and sample code for setting and modifying variable values using blocks. Changing the Value of a Variable Set ... to {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"variables_set\"><field name=\"VAR\">count</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This block is used to set the variable to be same as the value.  Parameters:  Screen Item Condition: Number...

Logic

This documentation covers logical operations, including conditionals, comparisons, and boolean logic, detailing how to execute actions based on various true or false conditions. Conditionals Continue Steps If It is Correct If true then {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"controls_if\"><value name=\"IF0\"><shadow type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></shadow></value></block></xml>"} This block is used to check if the value is true,...

Loops

This documentation explains various loop constructs for repeating actions, conditional execution, iterating over ranges and arrays, and terminating loops. Repeating Actions in Several Times Repeat 4 times {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"controls_repeat_ext\"><value name=\"TIMES\"><shadow type=\"math_whole_number\"><field name=\"NUM\">4</field></shadow></value></block></xml>"} This is used to do some actions in several times.  Parameters: Condition: Number (Default: 4)Output: N/ASample code: {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable></variables><block...

Teachable Machine

This documentation details using Teachable Machine for image and pose classification, including model loading, classification, displaying results, and converting predictions to JsonValue. Image Loading Custom Image Model from URL Image Model classify objects continuously in video/camera with abort control {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"TeachableMachine_loadImageModel\"><value name=\"baseUrl\"><shadow type=\"text\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This is used to load the...

JSON

This documentation covers various operations and transformations related to JsonValue, including construction, type checking, validation, conversions, and object manipulations, along with translating JsonValue to and from various data types and arrays. JsonValue Construction Translating the Screen Item to JsonValue Convert to JsonValue {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Json_toJsonValue\"/></xml>"} This is used to convent the Screen Item...

Task

The documentation covers methods for managing time-based tasks, including scheduling actions, breaking off tasks, and terminating actions using signals. Doing Tasks After a Few Seconds Run after ms with abort control {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Task_runAfter\"><value name=\"ms\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow></value></block></xml>"} This block is used to do some actions after a few milliseconds and...

File

The documentation provides guidance on interacting with various file types, including checking properties, loading content, and manipulating images and videos. Getting Something inside File Checking Different File Types File get type {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"File_FileContainer_getType\"><value name=\"this\"><block type=\"variables_get\"><field name=\"VAR\">file</field></block></value></block></xml>"} This is used to get the file type of the file.  Parameters: FileOutput: Screen Item...

Azure

The documentation covers various Azure services related to image and facial recognition, including object detection, face attributes, and verification capabilities. Common Receiving AI Result and Changing It to JsonValue Get AI result as JsonValue {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Azure_AiResult_getContentAsJsonValue\"><value name=\"result\"><block type=\"variables_get\"><field name=\"VAR\">result</field></block></value></block></xml>"} This block is used for getting the AI content result...

Camera

The documentation covers various aspects of working with cameras, including selection, access, connection, usage, and error handling for web applications. Camera Selection Allow Web App to Access Your Camera Enable camera feature {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Camera_enableCameraFeature\"><value name=\"enable\"><shadow type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></shadow></value></block></xml>"} This block is used to allow the Web App to open the...

Styling

This documentation outlines how to style screen items by modifying text, length, and color attributes. Value Present color Current Color {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"CssValues_currentColor\"/></xml>"} This block sets the text or background color using the color in parent node. The child node will inherit the parent node item to get the current...

Input

This documentation provides guidelines on input validation, and manages various input types such as colour input, buttons, checkboxes, text areas, option lists, file inputs, and numeric inputs. Input Validation Validate inputs in layout {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Control_validateInputs\"/></xml>"} This is used for checking the input in layout is valid or not. Parameters: Screen...

Text Block

This documentation covers generating labels and text blocks, setting and retrieving text on text blocks, and setting text on labels. Generate a Label Create label with text for input {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Control_createLabel\"><value name=\"labelText\"><shadow type=\"text\"><field name=\"TEXT\"/></shadow></value></block></xml>"} This block allows users to click the text within the label element. After label element...

Layout

This documentation details generating layouts, aligning wrapped text, setting text-justify properties, aligning items, configuring layouts as rows or columns, and positioning items within a layout. Generate a Layout Create layout {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"variables_set\"><field name=\"VAR\">layout</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow><block type=\"ScreenItem_createLayout\"/></value></block></xml>"} This block is used to create a new layout. Parameters: N/AOutput: Screen ItemSample code:...

Screen items

This documentation explains how to scroll elements into view, identify parent elements, clear and delete values in screen items, and add actions to screen items. Scrolling the element Into the Visible Area Screen Item scroll into view {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"ScreenItem_ScreenItem_scrollIntoView\"><value name=\"this\"><block type=\"variables_get\"><field name=\"VAR\">screenItem</field></block></value></block></xml>"} This block is used to scroll the...

Screen

This documentation covers how to start a program, navigate between screens, adjust display settings, generate screens with labels and layouts, remove screens, and access specific layout and label elements. Program Starts On Start {"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>mainLayout</variable><variable>mainScreen</variable><variable>faceDetectionResult</variable><variable>result</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"/></xml>"} This is used to execute an event when the program starts. Parameters: N/AOutput: N/ASample...

Setup AI Virtual Classroom (Requires Advanced Subscription)

This documentation guides teachers on setting up AI virtual classroom for students to develop AI apps with Una's MakeCode. Before you start, you should already complete reading: Create Virtual Classrooms and Features Overview Check school's remaining quota Teachers can click the “API Set” button to check the school's remaining quota...

Develop AI Apps with Una’s MakeCode (Requires Advanced Subscription)

This documentation guides students on using Una's MakeCode coding editors to develop AI apps with Una's MakeCode. Before you start, you should already complete reading: Micro:bit Coding with Una's MakeCode Types of Una's MakeCode Coding Editors Una virtual classroom embeds the original and modified versions of Microsoft MakeCode for students...

Create Virtual Classrooms and Features Overview

Before you create a new virtual classroom, you need to prepare a learning activity (Ref: Setup Learning Activities (Upload Learning Materials)) and a grouping template (Ref: Setup Grouping Templates).