From 19afea928dbb5385b1f5b6d224aadee154a9416e Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 10 May 2024 07:45:56 -0700 Subject: [PATCH] Port common docs to v10 --- common-docs/teachertool/catalog-shared.json | 5 ++ .../teachertool/test/catalog-shared.json | 1 + .../teachertool/validator-plans-shared.json | 57 ++++++++----------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/common-docs/teachertool/catalog-shared.json b/common-docs/teachertool/catalog-shared.json index 883162e77ca..af52b385028 100644 --- a/common-docs/teachertool/catalog-shared.json +++ b/common-docs/teachertool/catalog-shared.json @@ -6,6 +6,7 @@ "template": "${Block} used ${count} times", "description": "This block was used the specified number of times in your project.", "docPath": "/teachertool", + "tags": ["General"], "params": [ { "name": "block", @@ -27,6 +28,7 @@ "description": "The project contains at least the specified number of comments.", "docPath": "/teachertool", "maxCount": 1, + "tags": ["General"], "params": [ { "name": "count", @@ -43,6 +45,7 @@ "docPath": "/teachertool", "description": "The program uses at least this many loops of any kind (for, repeat, while, or for-of).", "maxCount": 1, + "tags": ["Code Elements"], "params": [ { "name": "count", @@ -59,6 +62,7 @@ "docPath": "/teachertool", "description": "At least this many user-defined functions are created and called.", "maxCount": 1, + "tags": ["Code Elements"], "params": [ { "name": "count", @@ -75,6 +79,7 @@ "docPath": "/teachertool", "description": "The program creates and uses at least this many user-defined variables.", "maxCount": 1, + "tags": ["Code Elements"], "params": [ { "name": "count", diff --git a/common-docs/teachertool/test/catalog-shared.json b/common-docs/teachertool/test/catalog-shared.json index 73e98c28ce4..bd4db6dc904 100644 --- a/common-docs/teachertool/test/catalog-shared.json +++ b/common-docs/teachertool/test/catalog-shared.json @@ -7,6 +7,7 @@ "description": "Experimental: AI outputs may not be accurate. Use with caution and always review responses.", "docPath": "/teachertool", "maxCount": 10, + "tags": ["General"], "params": [ { "name": "question", diff --git a/common-docs/teachertool/validator-plans-shared.json b/common-docs/teachertool/validator-plans-shared.json index ecfb5887764..681c7812ae0 100644 --- a/common-docs/teachertool/validator-plans-shared.json +++ b/common-docs/teachertool/validator-plans-shared.json @@ -86,38 +86,6 @@ } ] }, - { - ".desc": "A variable's value is set", - "name": "variable_set", - "threshold": 1, - "checks": [ - { - "validator": "blocksExist", - "blockCounts": [ - { - "blockId": "variables_set", - "count": 1 - } - ] - } - ] - }, - { - ".desc": "A variable's value is used", - "name": "variable_accessed", - "threshold": 1, - "checks": [ - { - "validator": "blocksExist", - "blockCounts": [ - { - "blockId": "variables_get", - "count": 1 - } - ] - } - ] - }, { ".desc": "A parameter's value is used", "name": "parameter_variable_accessed", @@ -301,6 +269,31 @@ "count": 0 } ] + }, + { + ".desc": "Variable creation & usage validation, with optional name filtering", + "name": "variable_usage", + "threshold": 1, + "checks": [ + { + "validator": "variableUsage", + "count": 0, + "name": "" + } + ] + }, + { + ".desc": "The zero number block is present.", + "name": "number_zero", + "threshold": 1, + "checks": [ + { + "validator": "blockFieldValueExists", + "fieldType": "NUM", + "fieldValue": 0, + "blockType": "math_number" + } + ] } ] }