diff --git a/js/CompletionCriteria.js b/js/CompletionCriteria.js index e7282ef..1bbc56a 100644 --- a/js/CompletionCriteria.js +++ b/js/CompletionCriteria.js @@ -4,6 +4,7 @@ export default { APPROX_TIME: "approx_time", + DETERMINED_BY_RESOURCE: "determined_by_resource", MASTERY: "mastery", PAGES: "pages", REFERENCE: "reference", @@ -25,7 +26,8 @@ export const SCHEMA = { "approx_time", "pages", "mastery", - "reference" + "reference", + "determined_by_resource" ] }, "mastery_criteria": { "$ref": "/schemas/mastery_criteria" } @@ -86,7 +88,10 @@ export const SCHEMA = { { "properties": { "model": { - "const": "reference" + "anyOf": [ + {"const": "reference"}, + {"const": "determined_by_resource"} + ] }, "threshold": { "type": "null" diff --git a/js/package.json b/js/package.json index 2e6ef86..b630ec9 100644 --- a/js/package.json +++ b/js/package.json @@ -27,5 +27,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "0.1.41" + "version": "0.1.42" } \ No newline at end of file diff --git a/le_utils/constants/completion_criteria.py b/le_utils/constants/completion_criteria.py index 230ac28..84c0b5e 100644 --- a/le_utils/constants/completion_criteria.py +++ b/le_utils/constants/completion_criteria.py @@ -5,6 +5,7 @@ # CompletionCriteria APPROX_TIME = "approx_time" +DETERMINED_BY_RESOURCE = "determined_by_resource" MASTERY = "mastery" PAGES = "pages" REFERENCE = "reference" @@ -12,6 +13,7 @@ choices = ( (APPROX_TIME, "Approx Time"), + (DETERMINED_BY_RESOURCE, "Determined By Resource"), (MASTERY, "Mastery"), (PAGES, "Pages"), (REFERENCE, "Reference"), @@ -20,6 +22,7 @@ COMPLETIONCRITERIALIST = [ APPROX_TIME, + DETERMINED_BY_RESOURCE, MASTERY, PAGES, REFERENCE, @@ -36,7 +39,14 @@ "model": { "type": "string", "$exportConstants": "completion_criteria", - "enum": ["time", "approx_time", "pages", "mastery", "reference"], + "enum": [ + "time", + "approx_time", + "pages", + "mastery", + "reference", + "determined_by_resource", + ], }, "mastery_criteria": {"$ref": "/schemas/mastery_criteria"}, }, @@ -82,7 +92,12 @@ }, { "properties": { - "model": {"const": "reference"}, + "model": { + "anyOf": [ + {"const": "reference"}, + {"const": "determined_by_resource"}, + ] + }, "threshold": {"type": "null"}, }, "required": [], diff --git a/setup.py b/setup.py index a7aea16..7d0247d 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="le-utils", packages=find_packages(), - version="0.1.41", + version="0.1.42", description="LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.", long_description=long_description, long_description_content_type="text/markdown", diff --git a/spec/schema-completion_criteria.json b/spec/schema-completion_criteria.json index de7969b..b6da3cb 100644 --- a/spec/schema-completion_criteria.json +++ b/spec/schema-completion_criteria.json @@ -13,7 +13,8 @@ "approx_time", "pages", "mastery", - "reference" + "reference", + "determined_by_resource" ] }, "mastery_criteria": { "$ref": "/schemas/mastery_criteria" } @@ -74,7 +75,10 @@ { "properties": { "model": { - "const": "reference" + "anyOf": [ + {"const": "reference"}, + {"const": "determined_by_resource"} + ] }, "threshold": { "type": "null"