From 9a1da384bd4006b0d75cf43892bb96829dc92e72 Mon Sep 17 00:00:00 2001 From: Liz Faubell Date: Fri, 26 Jul 2024 16:54:49 -0700 Subject: [PATCH 1/6] Fixing up logic around selecting/deselecting nested labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s a bug in label studio where if you use labels for conditional labeling (creating nested labels), and don’t deselect the label you’re on before attempting to label something else, the console will throw a bunch of errors and beachball of death, forcing you to reload the page. Fixing this by not allowing users to select a different top-level label if there are sub-labels already applied. Also not allowing users to remove a top-level label if there are sub-labels since that logically doesn't make sense. Issue: https://khanacademy.atlassian.net/browse/DI-1502 Test plan: - deployed to test; see in action here: https://data-labeling-test.khanacademy.org/projects/298/data?tab=537&page=1 --- src/env/development.js | 3 +- .../annotations/nested-labels.json | 108 ++++++++++++++++++ src/examples/nested_labels/config.xml | 24 ++++ src/examples/nested_labels/index.js | 5 + src/examples/nested_labels/tasks.json | 104 +++++++++++++++++ src/tags/control/Label.js | 24 ++++ 6 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 src/examples/nested_labels/annotations/nested-labels.json create mode 100644 src/examples/nested_labels/config.xml create mode 100644 src/examples/nested_labels/index.js create mode 100644 src/examples/nested_labels/tasks.json diff --git a/src/env/development.js b/src/env/development.js index 219bffe4d..70ec662e3 100644 --- a/src/env/development.js +++ b/src/env/development.js @@ -14,6 +14,7 @@ import { Sentiment } from '../examples/sentiment_analysis'; import { Nested as NestedSimple } from '../examples/nested_choices'; import { Nested } from '../examples/nested_choices/complicated'; import { Dialogue } from '../examples/phrases'; +import { NestedLabels } from '../examples/nested_labels'; /** * Audio/Video @@ -79,7 +80,7 @@ import { ClassificationMixed } from '../examples/classification_mixed'; // CHANGEME: Edit the example you want below: //const data = RichTextHtml; -const data = RichTextTable; +const data = NestedLabels; function getData(task) { if (task && task.data) { diff --git a/src/examples/nested_labels/annotations/nested-labels.json b/src/examples/nested_labels/annotations/nested-labels.json new file mode 100644 index 000000000..9172bdf53 --- /dev/null +++ b/src/examples/nested_labels/annotations/nested-labels.json @@ -0,0 +1,108 @@ +{ + "id": 0, + "annotations": [ + { + "result": [] + } + ], + "data": { + "dt": 1714608000000, + "kaid": "kaid_718941934514780264541355", + "link": "https:\/\/www.khanacademy.org\/profile\/me\/khanmigo\/history\/00021358b4c626c75350fffc2454e74e9fbd340b", + "segment": "grassroots-over18", + "reaction": null, + "sentiment": null, + "thread_id": "00021358b4c626c75350fffc2454e74e9fbd340b", + "unit_slug": "Learner AI Activities", + "is_allcaps": false, + "start_time": 1714690256804, + "course_slug": "AI Activities", + "domain_slug": "Internal courses", + "json_thread": "[[\"\",\"I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\\n\\nCan you tell me the problem or exercise you’d like to solve?\\n\\n - You can type it in or copy and paste below!\\n\\n - Click the bubble below and I can generate 10 practice problems for you!\\n\\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\\\(K\\\\left(cm\\\\right)^{2}\\\\)\",\"Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\\\( K \\\\) square centimeters.\\n\\nWhat do you think we need to find out about the square base to help us solve for \\\\( K \\\\)?\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\\\(Kcm^{2}\\\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{92}{47}K\\\\left(cm\\\\right)^{2}\\\\) . What is the side length, in cm, of each square base?\",\"Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\\\(2lw + 2lh + 2wh\\\\), where \\\\(l\\\\), \\\\(w\\\\), and \\\\(h\\\\) are the length, width, and height of the prism, respectively. \\n\\nIn our case, the base of the prism is a square, so \\\\(l = w = s\\\\), the side length of the square base. So, the surface area of one prism is \\\\(2s^{2} + 4sh\\\\). \\n\\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2K - 2s^{2}\\\\). \\n\\nWe're told that this is equal to \\\\(\\\\frac{92}{47}K\\\\). \\n\\nHow can we use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"give me similar questions\",\"Sure, let's try a similar problem:\\n\\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\\\(M cm^{2}\\\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{72}{37}M cm^{2}\\\\). What is the side length, in cm, of each square base?\\n\\nRemember, the surface area of a rectangular prism with a square base is given by \\\\(2s^{2} + 4sh\\\\), where \\\\(s\\\\) is the side length of the square base and \\\\(h\\\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2M - 2s^{2}\\\\). \\n\\nCan you use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"In the given equation ( \\\\(57\\\\left(x\\\\right)^{2}+57\\\\left(a+b\\\\right)x+ab=0\\\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?\",\"Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). \\n\\nIn our equation \\\\(57x^2 + 57(a+b)x + ab = 0\\\\), what are the values of \\\\(a\\\\) and \\\\(c\\\\)? And how can we use these to find the product of the roots?\"],[\"just give me similar equationa\",\"Sure, here's a similar problem:\\n\\nIn the given equation \\\\(72(x)^2 + 72(c+d)x + cd = 0\\\\), \\\\(c\\\\) and \\\\(d\\\\) are positive constants. The product of the solutions to the given equation is \\\\(lcd\\\\), where \\\\(l\\\\) is a constant. What is the value of \\\\(l\\\\)?\\n\\nRemember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). Can you use this information to find the value of \\\\(l\\\\)?\"]]", + "labeling_pk": "00021358b4c626c75350fffc2454e74e9fbd340b", + "lesson_slug": "Tutor Me", + "list_thread": [ + { + "id": "91e0f0acbaf74b579be5ab0ebb8587ed", + "text": "I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\n\nCan you tell me the problem or exercise you’d like to solve?\n\n - You can type it in or copy and paste below!\n\n - Click the bubble below and I can generate 10 practice problems for you!\n\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!", + "author": "Khamigo", + "dialogue_id": "85e606f8ebbc4baca43a6174e233fc70" + }, + { + "id": "6a1010416a234b9fb8a3c96c921425f2", + "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\(K\\left(cm\\right)^{2}\\)", + "author": "User", + "dialogue_id": "3380f67bf08244108451b241a19a7790" + }, + { + "id": "486237593b5242ad9cc7e20302bad485", + "text": "Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\( K \\) square centimeters.\n\nWhat do you think we need to find out about the square base to help us solve for \\( K \\)?", + "author": "Khamigo", + "dialogue_id": "eb06a0c0849343eeacd9b7c9bb3c2952" + }, + { + "id": "4fc1de609f0b4357b066ad5ba7ea69f7", + "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\(Kcm^{2}\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{92}{47}K\\left(cm\\right)^{2}\\) . What is the side length, in cm, of each square base?", + "author": "User", + "dialogue_id": "6f67b2327d00495b8a140d58e5e1f8e9" + }, + { + "id": "cf13e116a12e4fa1b1ff85905ddb5f2e", + "text": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", + "author": "Khamigo", + "dialogue_id": "bfabb7de8bb741548734cf705f4c810b" + }, + { + "id": "7344ca788b21432c996f9f2e5f402f14", + "text": "give me similar questions", + "author": "User", + "dialogue_id": "987e6d966ca346dda77e7ef779539614" + }, + { + "id": "53ab44705b6b4a01b77f009c0fd9ab80", + "text": "Sure, let's try a similar problem:\n\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\(M cm^{2}\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{72}{37}M cm^{2}\\). What is the side length, in cm, of each square base?\n\nRemember, the surface area of a rectangular prism with a square base is given by \\(2s^{2} + 4sh\\), where \\(s\\) is the side length of the square base and \\(h\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2M - 2s^{2}\\). \n\nCan you use this information to write an equation that we can solve for \\(s\\)?", + "author": "Khamigo", + "dialogue_id": "ea8900509cd54bcfa2e7ee1cc5519baa" + }, + { + "id": "060dbe6a330646f1948a9e4967b3562f", + "text": "In the given equation ( \\(57\\left(x\\right)^{2}+57\\left(a+b\\right)x+ab=0\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?", + "author": "User", + "dialogue_id": "49b5522949cd4c2887c1a9c611ecc4ce" + }, + { + "id": "a3e38a1487524a5f88ec3374565003b2", + "text": "Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). \n\nIn our equation \\(57x^2 + 57(a+b)x + ab = 0\\), what are the values of \\(a\\) and \\(c\\)? And how can we use these to find the product of the roots?", + "author": "Khamigo", + "dialogue_id": "55b4aaea2a59492f971d853a0934d59f" + }, + { + "id": "12e026b73f8a463d9c1b1831abee28df", + "text": "just give me similar equationa", + "author": "User", + "dialogue_id": "23ff5a2f09374d718024ed932310bc7e" + }, + { + "id": "11215401eea14163aaf7888abf77b1ac", + "text": "Sure, here's a similar problem:\n\nIn the given equation \\(72(x)^2 + 72(c+d)x + cd = 0\\), \\(c\\) and \\(d\\) are positive constants. The product of the solutions to the given equation is \\(lcd\\), where \\(l\\) is a constant. What is the value of \\(l\\)?\n\nRemember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). Can you use this information to find the value of \\(l\\)?", + "author": "Khamigo", + "dialogue_id": "5e2e523a2d6e4796b4cbc4de2b889dbb" + } + ], + "prompt_name": "activity-tutor-me-stem", + "reaction_note": null, + "sample_source": 3, + "thread_length": 6, + "highlighted_idx": 1, + "enrollment_group": "user-purchase", + "course_slug_clean": "AI Activities", + "has_reaction_note": false, + "user_primary_type": "Learner", + "has_apology_phrase": false, + "highlighted_answer": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", + "highlighted_question": "", + "json_interaction_ids": "[\"3546660825359e3664634ddaaf55dc89b6f9649a\",\"209a2f469b1ce80ebde2aecff91c2d811ee65150\",\"9037a86802fe2aa55f68625ae16f9ea5a6e88659\",\"6af1200e1ab11b892992302f5787cedf220016ac\",\"5b6297c4a2da5c4c37130aba0ba9c211e13676e5\",\"ddf94248018372842955932f7647a548f5846b5f\"]", + "highlighted_interaction_id": "209a2f469b1ce80ebde2aecff91c2d811ee65150" + }, + "task_path": "../examples/nested_labels/tasks.json" +} \ No newline at end of file diff --git a/src/examples/nested_labels/config.xml b/src/examples/nested_labels/config.xml new file mode 100644 index 000000000..6b0d2f8d6 --- /dev/null +++ b/src/examples/nested_labels/config.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/examples/nested_labels/index.js b/src/examples/nested_labels/index.js new file mode 100644 index 000000000..4ed51548c --- /dev/null +++ b/src/examples/nested_labels/index.js @@ -0,0 +1,5 @@ +import config from './config.xml'; +import tasks from './tasks.json'; +import annotation from './annotations/nested-labels.json'; + +export const NestedLabels = { config, tasks, annotation }; diff --git a/src/examples/nested_labels/tasks.json b/src/examples/nested_labels/tasks.json new file mode 100644 index 000000000..1550aa1a1 --- /dev/null +++ b/src/examples/nested_labels/tasks.json @@ -0,0 +1,104 @@ +[ + { + "data": { + "dt": 1714608000000, + "kaid": "kaid_718941934514780264541355", + "link": "https:\/\/www.khanacademy.org\/profile\/me\/khanmigo\/history\/00021358b4c626c75350fffc2454e74e9fbd340b", + "segment": "grassroots-over18", + "reaction": null, + "sentiment": null, + "thread_id": "00021358b4c626c75350fffc2454e74e9fbd340b", + "unit_slug": "Learner AI Activities", + "is_allcaps": false, + "start_time": 1714690256804, + "course_slug": "AI Activities", + "domain_slug": "Internal courses", + "json_thread": "[[\"\",\"I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\\n\\nCan you tell me the problem or exercise you’d like to solve?\\n\\n - You can type it in or copy and paste below!\\n\\n - Click the bubble below and I can generate 10 practice problems for you!\\n\\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\\\(K\\\\left(cm\\\\right)^{2}\\\\)\",\"Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\\\( K \\\\) square centimeters.\\n\\nWhat do you think we need to find out about the square base to help us solve for \\\\( K \\\\)?\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\\\(Kcm^{2}\\\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{92}{47}K\\\\left(cm\\\\right)^{2}\\\\) . What is the side length, in cm, of each square base?\",\"Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\\\(2lw + 2lh + 2wh\\\\), where \\\\(l\\\\), \\\\(w\\\\), and \\\\(h\\\\) are the length, width, and height of the prism, respectively. \\n\\nIn our case, the base of the prism is a square, so \\\\(l = w = s\\\\), the side length of the square base. So, the surface area of one prism is \\\\(2s^{2} + 4sh\\\\). \\n\\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2K - 2s^{2}\\\\). \\n\\nWe're told that this is equal to \\\\(\\\\frac{92}{47}K\\\\). \\n\\nHow can we use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"give me similar questions\",\"Sure, let's try a similar problem:\\n\\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\\\(M cm^{2}\\\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{72}{37}M cm^{2}\\\\). What is the side length, in cm, of each square base?\\n\\nRemember, the surface area of a rectangular prism with a square base is given by \\\\(2s^{2} + 4sh\\\\), where \\\\(s\\\\) is the side length of the square base and \\\\(h\\\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2M - 2s^{2}\\\\). \\n\\nCan you use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"In the given equation ( \\\\(57\\\\left(x\\\\right)^{2}+57\\\\left(a+b\\\\right)x+ab=0\\\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?\",\"Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). \\n\\nIn our equation \\\\(57x^2 + 57(a+b)x + ab = 0\\\\), what are the values of \\\\(a\\\\) and \\\\(c\\\\)? And how can we use these to find the product of the roots?\"],[\"just give me similar equationa\",\"Sure, here's a similar problem:\\n\\nIn the given equation \\\\(72(x)^2 + 72(c+d)x + cd = 0\\\\), \\\\(c\\\\) and \\\\(d\\\\) are positive constants. The product of the solutions to the given equation is \\\\(lcd\\\\), where \\\\(l\\\\) is a constant. What is the value of \\\\(l\\\\)?\\n\\nRemember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). Can you use this information to find the value of \\\\(l\\\\)?\"]]", + "labeling_pk": "00021358b4c626c75350fffc2454e74e9fbd340b", + "lesson_slug": "Tutor Me", + "list_thread": [ + { + "id": "91e0f0acbaf74b579be5ab0ebb8587ed", + "text": "I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\n\nCan you tell me the problem or exercise you’d like to solve?\n\n - You can type it in or copy and paste below!\n\n - Click the bubble below and I can generate 10 practice problems for you!\n\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!", + "author": "Khamigo", + "dialogue_id": "85e606f8ebbc4baca43a6174e233fc70" + }, + { + "id": "6a1010416a234b9fb8a3c96c921425f2", + "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\(K\\left(cm\\right)^{2}\\)", + "author": "User", + "dialogue_id": "3380f67bf08244108451b241a19a7790" + }, + { + "id": "486237593b5242ad9cc7e20302bad485", + "text": "Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\( K \\) square centimeters.\n\nWhat do you think we need to find out about the square base to help us solve for \\( K \\)?", + "author": "Khamigo", + "dialogue_id": "eb06a0c0849343eeacd9b7c9bb3c2952" + }, + { + "id": "4fc1de609f0b4357b066ad5ba7ea69f7", + "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\(Kcm^{2}\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{92}{47}K\\left(cm\\right)^{2}\\) . What is the side length, in cm, of each square base?", + "author": "User", + "dialogue_id": "6f67b2327d00495b8a140d58e5e1f8e9" + }, + { + "id": "cf13e116a12e4fa1b1ff85905ddb5f2e", + "text": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", + "author": "Khamigo", + "dialogue_id": "bfabb7de8bb741548734cf705f4c810b" + }, + { + "id": "7344ca788b21432c996f9f2e5f402f14", + "text": "give me similar questions", + "author": "User", + "dialogue_id": "987e6d966ca346dda77e7ef779539614" + }, + { + "id": "53ab44705b6b4a01b77f009c0fd9ab80", + "text": "Sure, let's try a similar problem:\n\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\(M cm^{2}\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{72}{37}M cm^{2}\\). What is the side length, in cm, of each square base?\n\nRemember, the surface area of a rectangular prism with a square base is given by \\(2s^{2} + 4sh\\), where \\(s\\) is the side length of the square base and \\(h\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2M - 2s^{2}\\). \n\nCan you use this information to write an equation that we can solve for \\(s\\)?", + "author": "Khamigo", + "dialogue_id": "ea8900509cd54bcfa2e7ee1cc5519baa" + }, + { + "id": "060dbe6a330646f1948a9e4967b3562f", + "text": "In the given equation ( \\(57\\left(x\\right)^{2}+57\\left(a+b\\right)x+ab=0\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?", + "author": "User", + "dialogue_id": "49b5522949cd4c2887c1a9c611ecc4ce" + }, + { + "id": "a3e38a1487524a5f88ec3374565003b2", + "text": "Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). \n\nIn our equation \\(57x^2 + 57(a+b)x + ab = 0\\), what are the values of \\(a\\) and \\(c\\)? And how can we use these to find the product of the roots?", + "author": "Khamigo", + "dialogue_id": "55b4aaea2a59492f971d853a0934d59f" + }, + { + "id": "12e026b73f8a463d9c1b1831abee28df", + "text": "just give me similar equationa", + "author": "User", + "dialogue_id": "23ff5a2f09374d718024ed932310bc7e" + }, + { + "id": "11215401eea14163aaf7888abf77b1ac", + "text": "Sure, here's a similar problem:\n\nIn the given equation \\(72(x)^2 + 72(c+d)x + cd = 0\\), \\(c\\) and \\(d\\) are positive constants. The product of the solutions to the given equation is \\(lcd\\), where \\(l\\) is a constant. What is the value of \\(l\\)?\n\nRemember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). Can you use this information to find the value of \\(l\\)?", + "author": "Khamigo", + "dialogue_id": "5e2e523a2d6e4796b4cbc4de2b889dbb" + } + ], + "prompt_name": "activity-tutor-me-stem", + "reaction_note": null, + "sample_source": 3, + "thread_length": 6, + "highlighted_idx": 1, + "enrollment_group": "user-purchase", + "course_slug_clean": "AI Activities", + "has_reaction_note": false, + "user_primary_type": "Learner", + "has_apology_phrase": false, + "highlighted_answer": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", + "highlighted_question": "", + "json_interaction_ids": "[\"3546660825359e3664634ddaaf55dc89b6f9649a\",\"209a2f469b1ce80ebde2aecff91c2d811ee65150\",\"9037a86802fe2aa55f68625ae16f9ea5a6e88659\",\"6af1200e1ab11b892992302f5787cedf220016ac\",\"5b6297c4a2da5c4c37130aba0ba9c211e13676e5\",\"ddf94248018372842955932f7647a548f5846b5f\"]", + "highlighted_interaction_id": "209a2f469b1ce80ebde2aecff91c2d811ee65150" + }, + "predictions": [] + } +] diff --git a/src/tags/control/Label.js b/src/tags/control/Label.js index bebcd18be..0a0a79099 100644 --- a/src/tags/control/Label.js +++ b/src/tags/control/Label.js @@ -157,6 +157,30 @@ const Model = types.model({ // if that's the only selected label, the only labelset assigned to region, // and we are trying to unselect it, then don't allow that // (except for rare labelsets that allow empty labels) + + // Don't allow selecting a different top-level label when we've already labeled it: DI-1502 + if ( + labels.selectedLabels.length === 1 && + !self.selected && + labels.selectedLabels[0].value !== self.value && + !labels.selectedLabels[0].alias // Hack: we only gave sub-labels aliases + ) { + return false; + } + + // If this is only top level label and there are sub labels, don't allow deselect + if ( + labels.selectedLabels.length === 1 && + self.selected && + labels.selectedLabels[0].value == self.value && + !labels.selectedLabels[0].alias && // Hack: we only gave sub-labels aliases + region.labelings.length > 1 + ) { + console.log("can't deselect top level label w sub label!") + + return false; + } + if ( labels.selectedLabels.length === 1 && self.selected && From 3ce26f0e79d2c377b79ef671397b0decd49c726a Mon Sep 17 00:00:00 2001 From: Liz Faubell Date: Fri, 26 Jul 2024 16:57:59 -0700 Subject: [PATCH 2/6] Removing nested labels data details; can add locally if needed Issue: Test plan: --- src/env/development.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/env/development.js b/src/env/development.js index 70ec662e3..219bffe4d 100644 --- a/src/env/development.js +++ b/src/env/development.js @@ -14,7 +14,6 @@ import { Sentiment } from '../examples/sentiment_analysis'; import { Nested as NestedSimple } from '../examples/nested_choices'; import { Nested } from '../examples/nested_choices/complicated'; import { Dialogue } from '../examples/phrases'; -import { NestedLabels } from '../examples/nested_labels'; /** * Audio/Video @@ -80,7 +79,7 @@ import { ClassificationMixed } from '../examples/classification_mixed'; // CHANGEME: Edit the example you want below: //const data = RichTextHtml; -const data = NestedLabels; +const data = RichTextTable; function getData(task) { if (task && task.data) { From a0281e55f977c84a3c8df461287aeb00027af01e Mon Sep 17 00:00:00 2001 From: Liz Faubell Date: Fri, 26 Jul 2024 17:00:13 -0700 Subject: [PATCH 3/6] Removing test file Issue: Test plan: --- .../annotations/nested-labels.json | 108 ------------------ 1 file changed, 108 deletions(-) delete mode 100644 src/examples/nested_labels/annotations/nested-labels.json diff --git a/src/examples/nested_labels/annotations/nested-labels.json b/src/examples/nested_labels/annotations/nested-labels.json deleted file mode 100644 index 9172bdf53..000000000 --- a/src/examples/nested_labels/annotations/nested-labels.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "id": 0, - "annotations": [ - { - "result": [] - } - ], - "data": { - "dt": 1714608000000, - "kaid": "kaid_718941934514780264541355", - "link": "https:\/\/www.khanacademy.org\/profile\/me\/khanmigo\/history\/00021358b4c626c75350fffc2454e74e9fbd340b", - "segment": "grassroots-over18", - "reaction": null, - "sentiment": null, - "thread_id": "00021358b4c626c75350fffc2454e74e9fbd340b", - "unit_slug": "Learner AI Activities", - "is_allcaps": false, - "start_time": 1714690256804, - "course_slug": "AI Activities", - "domain_slug": "Internal courses", - "json_thread": "[[\"\",\"I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\\n\\nCan you tell me the problem or exercise you’d like to solve?\\n\\n - You can type it in or copy and paste below!\\n\\n - Click the bubble below and I can generate 10 practice problems for you!\\n\\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\\\(K\\\\left(cm\\\\right)^{2}\\\\)\",\"Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\\\( K \\\\) square centimeters.\\n\\nWhat do you think we need to find out about the square base to help us solve for \\\\( K \\\\)?\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\\\(Kcm^{2}\\\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{92}{47}K\\\\left(cm\\\\right)^{2}\\\\) . What is the side length, in cm, of each square base?\",\"Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\\\(2lw + 2lh + 2wh\\\\), where \\\\(l\\\\), \\\\(w\\\\), and \\\\(h\\\\) are the length, width, and height of the prism, respectively. \\n\\nIn our case, the base of the prism is a square, so \\\\(l = w = s\\\\), the side length of the square base. So, the surface area of one prism is \\\\(2s^{2} + 4sh\\\\). \\n\\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2K - 2s^{2}\\\\). \\n\\nWe're told that this is equal to \\\\(\\\\frac{92}{47}K\\\\). \\n\\nHow can we use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"give me similar questions\",\"Sure, let's try a similar problem:\\n\\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\\\(M cm^{2}\\\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{72}{37}M cm^{2}\\\\). What is the side length, in cm, of each square base?\\n\\nRemember, the surface area of a rectangular prism with a square base is given by \\\\(2s^{2} + 4sh\\\\), where \\\\(s\\\\) is the side length of the square base and \\\\(h\\\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2M - 2s^{2}\\\\). \\n\\nCan you use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"In the given equation ( \\\\(57\\\\left(x\\\\right)^{2}+57\\\\left(a+b\\\\right)x+ab=0\\\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?\",\"Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). \\n\\nIn our equation \\\\(57x^2 + 57(a+b)x + ab = 0\\\\), what are the values of \\\\(a\\\\) and \\\\(c\\\\)? And how can we use these to find the product of the roots?\"],[\"just give me similar equationa\",\"Sure, here's a similar problem:\\n\\nIn the given equation \\\\(72(x)^2 + 72(c+d)x + cd = 0\\\\), \\\\(c\\\\) and \\\\(d\\\\) are positive constants. The product of the solutions to the given equation is \\\\(lcd\\\\), where \\\\(l\\\\) is a constant. What is the value of \\\\(l\\\\)?\\n\\nRemember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). Can you use this information to find the value of \\\\(l\\\\)?\"]]", - "labeling_pk": "00021358b4c626c75350fffc2454e74e9fbd340b", - "lesson_slug": "Tutor Me", - "list_thread": [ - { - "id": "91e0f0acbaf74b579be5ab0ebb8587ed", - "text": "I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\n\nCan you tell me the problem or exercise you’d like to solve?\n\n - You can type it in or copy and paste below!\n\n - Click the bubble below and I can generate 10 practice problems for you!\n\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!", - "author": "Khamigo", - "dialogue_id": "85e606f8ebbc4baca43a6174e233fc70" - }, - { - "id": "6a1010416a234b9fb8a3c96c921425f2", - "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\(K\\left(cm\\right)^{2}\\)", - "author": "User", - "dialogue_id": "3380f67bf08244108451b241a19a7790" - }, - { - "id": "486237593b5242ad9cc7e20302bad485", - "text": "Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\( K \\) square centimeters.\n\nWhat do you think we need to find out about the square base to help us solve for \\( K \\)?", - "author": "Khamigo", - "dialogue_id": "eb06a0c0849343eeacd9b7c9bb3c2952" - }, - { - "id": "4fc1de609f0b4357b066ad5ba7ea69f7", - "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\(Kcm^{2}\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{92}{47}K\\left(cm\\right)^{2}\\) . What is the side length, in cm, of each square base?", - "author": "User", - "dialogue_id": "6f67b2327d00495b8a140d58e5e1f8e9" - }, - { - "id": "cf13e116a12e4fa1b1ff85905ddb5f2e", - "text": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", - "author": "Khamigo", - "dialogue_id": "bfabb7de8bb741548734cf705f4c810b" - }, - { - "id": "7344ca788b21432c996f9f2e5f402f14", - "text": "give me similar questions", - "author": "User", - "dialogue_id": "987e6d966ca346dda77e7ef779539614" - }, - { - "id": "53ab44705b6b4a01b77f009c0fd9ab80", - "text": "Sure, let's try a similar problem:\n\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\(M cm^{2}\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{72}{37}M cm^{2}\\). What is the side length, in cm, of each square base?\n\nRemember, the surface area of a rectangular prism with a square base is given by \\(2s^{2} + 4sh\\), where \\(s\\) is the side length of the square base and \\(h\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2M - 2s^{2}\\). \n\nCan you use this information to write an equation that we can solve for \\(s\\)?", - "author": "Khamigo", - "dialogue_id": "ea8900509cd54bcfa2e7ee1cc5519baa" - }, - { - "id": "060dbe6a330646f1948a9e4967b3562f", - "text": "In the given equation ( \\(57\\left(x\\right)^{2}+57\\left(a+b\\right)x+ab=0\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?", - "author": "User", - "dialogue_id": "49b5522949cd4c2887c1a9c611ecc4ce" - }, - { - "id": "a3e38a1487524a5f88ec3374565003b2", - "text": "Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). \n\nIn our equation \\(57x^2 + 57(a+b)x + ab = 0\\), what are the values of \\(a\\) and \\(c\\)? And how can we use these to find the product of the roots?", - "author": "Khamigo", - "dialogue_id": "55b4aaea2a59492f971d853a0934d59f" - }, - { - "id": "12e026b73f8a463d9c1b1831abee28df", - "text": "just give me similar equationa", - "author": "User", - "dialogue_id": "23ff5a2f09374d718024ed932310bc7e" - }, - { - "id": "11215401eea14163aaf7888abf77b1ac", - "text": "Sure, here's a similar problem:\n\nIn the given equation \\(72(x)^2 + 72(c+d)x + cd = 0\\), \\(c\\) and \\(d\\) are positive constants. The product of the solutions to the given equation is \\(lcd\\), where \\(l\\) is a constant. What is the value of \\(l\\)?\n\nRemember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). Can you use this information to find the value of \\(l\\)?", - "author": "Khamigo", - "dialogue_id": "5e2e523a2d6e4796b4cbc4de2b889dbb" - } - ], - "prompt_name": "activity-tutor-me-stem", - "reaction_note": null, - "sample_source": 3, - "thread_length": 6, - "highlighted_idx": 1, - "enrollment_group": "user-purchase", - "course_slug_clean": "AI Activities", - "has_reaction_note": false, - "user_primary_type": "Learner", - "has_apology_phrase": false, - "highlighted_answer": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", - "highlighted_question": "", - "json_interaction_ids": "[\"3546660825359e3664634ddaaf55dc89b6f9649a\",\"209a2f469b1ce80ebde2aecff91c2d811ee65150\",\"9037a86802fe2aa55f68625ae16f9ea5a6e88659\",\"6af1200e1ab11b892992302f5787cedf220016ac\",\"5b6297c4a2da5c4c37130aba0ba9c211e13676e5\",\"ddf94248018372842955932f7647a548f5846b5f\"]", - "highlighted_interaction_id": "209a2f469b1ce80ebde2aecff91c2d811ee65150" - }, - "task_path": "../examples/nested_labels/tasks.json" -} \ No newline at end of file From 333be4a3802613d3a97ec41e5cd175e9d5612fd0 Mon Sep 17 00:00:00 2001 From: Liz Faubell Date: Fri, 26 Jul 2024 17:02:11 -0700 Subject: [PATCH 4/6] Removing example tasks Issue: Test plan: --- src/examples/nested_labels/tasks.json | 104 -------------------------- 1 file changed, 104 deletions(-) delete mode 100644 src/examples/nested_labels/tasks.json diff --git a/src/examples/nested_labels/tasks.json b/src/examples/nested_labels/tasks.json deleted file mode 100644 index 1550aa1a1..000000000 --- a/src/examples/nested_labels/tasks.json +++ /dev/null @@ -1,104 +0,0 @@ -[ - { - "data": { - "dt": 1714608000000, - "kaid": "kaid_718941934514780264541355", - "link": "https:\/\/www.khanacademy.org\/profile\/me\/khanmigo\/history\/00021358b4c626c75350fffc2454e74e9fbd340b", - "segment": "grassroots-over18", - "reaction": null, - "sentiment": null, - "thread_id": "00021358b4c626c75350fffc2454e74e9fbd340b", - "unit_slug": "Learner AI Activities", - "is_allcaps": false, - "start_time": 1714690256804, - "course_slug": "AI Activities", - "domain_slug": "Internal courses", - "json_thread": "[[\"\",\"I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\\n\\nCan you tell me the problem or exercise you’d like to solve?\\n\\n - You can type it in or copy and paste below!\\n\\n - Click the bubble below and I can generate 10 practice problems for you!\\n\\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\\\(K\\\\left(cm\\\\right)^{2}\\\\)\",\"Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\\\( K \\\\) square centimeters.\\n\\nWhat do you think we need to find out about the square base to help us solve for \\\\( K \\\\)?\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\\\(Kcm^{2}\\\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{92}{47}K\\\\left(cm\\\\right)^{2}\\\\) . What is the side length, in cm, of each square base?\",\"Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\\\(2lw + 2lh + 2wh\\\\), where \\\\(l\\\\), \\\\(w\\\\), and \\\\(h\\\\) are the length, width, and height of the prism, respectively. \\n\\nIn our case, the base of the prism is a square, so \\\\(l = w = s\\\\), the side length of the square base. So, the surface area of one prism is \\\\(2s^{2} + 4sh\\\\). \\n\\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2K - 2s^{2}\\\\). \\n\\nWe're told that this is equal to \\\\(\\\\frac{92}{47}K\\\\). \\n\\nHow can we use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"give me similar questions\",\"Sure, let's try a similar problem:\\n\\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\\\(M cm^{2}\\\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{72}{37}M cm^{2}\\\\). What is the side length, in cm, of each square base?\\n\\nRemember, the surface area of a rectangular prism with a square base is given by \\\\(2s^{2} + 4sh\\\\), where \\\\(s\\\\) is the side length of the square base and \\\\(h\\\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2M - 2s^{2}\\\\). \\n\\nCan you use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"In the given equation ( \\\\(57\\\\left(x\\\\right)^{2}+57\\\\left(a+b\\\\right)x+ab=0\\\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?\",\"Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). \\n\\nIn our equation \\\\(57x^2 + 57(a+b)x + ab = 0\\\\), what are the values of \\\\(a\\\\) and \\\\(c\\\\)? And how can we use these to find the product of the roots?\"],[\"just give me similar equationa\",\"Sure, here's a similar problem:\\n\\nIn the given equation \\\\(72(x)^2 + 72(c+d)x + cd = 0\\\\), \\\\(c\\\\) and \\\\(d\\\\) are positive constants. The product of the solutions to the given equation is \\\\(lcd\\\\), where \\\\(l\\\\) is a constant. What is the value of \\\\(l\\\\)?\\n\\nRemember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). Can you use this information to find the value of \\\\(l\\\\)?\"]]", - "labeling_pk": "00021358b4c626c75350fffc2454e74e9fbd340b", - "lesson_slug": "Tutor Me", - "list_thread": [ - { - "id": "91e0f0acbaf74b579be5ab0ebb8587ed", - "text": "I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\n\nCan you tell me the problem or exercise you’d like to solve?\n\n - You can type it in or copy and paste below!\n\n - Click the bubble below and I can generate 10 practice problems for you!\n\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!", - "author": "Khamigo", - "dialogue_id": "85e606f8ebbc4baca43a6174e233fc70" - }, - { - "id": "6a1010416a234b9fb8a3c96c921425f2", - "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\(K\\left(cm\\right)^{2}\\)", - "author": "User", - "dialogue_id": "3380f67bf08244108451b241a19a7790" - }, - { - "id": "486237593b5242ad9cc7e20302bad485", - "text": "Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\( K \\) square centimeters.\n\nWhat do you think we need to find out about the square base to help us solve for \\( K \\)?", - "author": "Khamigo", - "dialogue_id": "eb06a0c0849343eeacd9b7c9bb3c2952" - }, - { - "id": "4fc1de609f0b4357b066ad5ba7ea69f7", - "text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\(Kcm^{2}\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{92}{47}K\\left(cm\\right)^{2}\\) . What is the side length, in cm, of each square base?", - "author": "User", - "dialogue_id": "6f67b2327d00495b8a140d58e5e1f8e9" - }, - { - "id": "cf13e116a12e4fa1b1ff85905ddb5f2e", - "text": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", - "author": "Khamigo", - "dialogue_id": "bfabb7de8bb741548734cf705f4c810b" - }, - { - "id": "7344ca788b21432c996f9f2e5f402f14", - "text": "give me similar questions", - "author": "User", - "dialogue_id": "987e6d966ca346dda77e7ef779539614" - }, - { - "id": "53ab44705b6b4a01b77f009c0fd9ab80", - "text": "Sure, let's try a similar problem:\n\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\(M cm^{2}\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{72}{37}M cm^{2}\\). What is the side length, in cm, of each square base?\n\nRemember, the surface area of a rectangular prism with a square base is given by \\(2s^{2} + 4sh\\), where \\(s\\) is the side length of the square base and \\(h\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2M - 2s^{2}\\). \n\nCan you use this information to write an equation that we can solve for \\(s\\)?", - "author": "Khamigo", - "dialogue_id": "ea8900509cd54bcfa2e7ee1cc5519baa" - }, - { - "id": "060dbe6a330646f1948a9e4967b3562f", - "text": "In the given equation ( \\(57\\left(x\\right)^{2}+57\\left(a+b\\right)x+ab=0\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?", - "author": "User", - "dialogue_id": "49b5522949cd4c2887c1a9c611ecc4ce" - }, - { - "id": "a3e38a1487524a5f88ec3374565003b2", - "text": "Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). \n\nIn our equation \\(57x^2 + 57(a+b)x + ab = 0\\), what are the values of \\(a\\) and \\(c\\)? And how can we use these to find the product of the roots?", - "author": "Khamigo", - "dialogue_id": "55b4aaea2a59492f971d853a0934d59f" - }, - { - "id": "12e026b73f8a463d9c1b1831abee28df", - "text": "just give me similar equationa", - "author": "User", - "dialogue_id": "23ff5a2f09374d718024ed932310bc7e" - }, - { - "id": "11215401eea14163aaf7888abf77b1ac", - "text": "Sure, here's a similar problem:\n\nIn the given equation \\(72(x)^2 + 72(c+d)x + cd = 0\\), \\(c\\) and \\(d\\) are positive constants. The product of the solutions to the given equation is \\(lcd\\), where \\(l\\) is a constant. What is the value of \\(l\\)?\n\nRemember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). Can you use this information to find the value of \\(l\\)?", - "author": "Khamigo", - "dialogue_id": "5e2e523a2d6e4796b4cbc4de2b889dbb" - } - ], - "prompt_name": "activity-tutor-me-stem", - "reaction_note": null, - "sample_source": 3, - "thread_length": 6, - "highlighted_idx": 1, - "enrollment_group": "user-purchase", - "course_slug_clean": "AI Activities", - "has_reaction_note": false, - "user_primary_type": "Learner", - "has_apology_phrase": false, - "highlighted_answer": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?", - "highlighted_question": "", - "json_interaction_ids": "[\"3546660825359e3664634ddaaf55dc89b6f9649a\",\"209a2f469b1ce80ebde2aecff91c2d811ee65150\",\"9037a86802fe2aa55f68625ae16f9ea5a6e88659\",\"6af1200e1ab11b892992302f5787cedf220016ac\",\"5b6297c4a2da5c4c37130aba0ba9c211e13676e5\",\"ddf94248018372842955932f7647a548f5846b5f\"]", - "highlighted_interaction_id": "209a2f469b1ce80ebde2aecff91c2d811ee65150" - }, - "predictions": [] - } -] From b9a1fe1191dbefda5c44c03b91297bc194efde42 Mon Sep 17 00:00:00 2001 From: lizfaubell <50882112+lizfaubell@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:10:26 -0700 Subject: [PATCH 5/6] Update src/tags/control/Label.js Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/tags/control/Label.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags/control/Label.js b/src/tags/control/Label.js index 0a0a79099..e58593ee3 100644 --- a/src/tags/control/Label.js +++ b/src/tags/control/Label.js @@ -176,7 +176,7 @@ const Model = types.model({ !labels.selectedLabels[0].alias && // Hack: we only gave sub-labels aliases region.labelings.length > 1 ) { - console.log("can't deselect top level label w sub label!") + console.log('can\'t deselect top level label w sub label!') return false; } From 76eca8b522a94a4838c6112cd728cca111079f43 Mon Sep 17 00:00:00 2001 From: Liz Faubell Date: Fri, 26 Jul 2024 17:11:14 -0700 Subject: [PATCH 6/6] Lint fix Issue: Test plan: --- src/tags/control/Label.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tags/control/Label.js b/src/tags/control/Label.js index e58593ee3..e11d170c3 100644 --- a/src/tags/control/Label.js +++ b/src/tags/control/Label.js @@ -172,11 +172,11 @@ const Model = types.model({ if ( labels.selectedLabels.length === 1 && self.selected && - labels.selectedLabels[0].value == self.value && + labels.selectedLabels[0].value === self.value && !labels.selectedLabels[0].alias && // Hack: we only gave sub-labels aliases region.labelings.length > 1 ) { - console.log('can\'t deselect top level label w sub label!') + console.log('can\'t deselect top level label w sub label!'); return false; }