From 19f318679f40e8026de0f774748513f1c1e8f4cb Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Tue, 13 Jul 2021 16:28:45 -0400 Subject: [PATCH 1/3] Add example url --- docs/decisions/0009-courseware-url-shortening.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/decisions/0009-courseware-url-shortening.md b/docs/decisions/0009-courseware-url-shortening.md index ac21641d..8a52f62c 100644 --- a/docs/decisions/0009-courseware-url-shortening.md +++ b/docs/decisions/0009-courseware-url-shortening.md @@ -27,6 +27,15 @@ The courseware URL will format to the following structure: ``` https://learning.edx.org/c/:courseId/:sequenceHash/:unitHash/:sectionSlug/:sequenceSlug/:unitSlug/ + +``` + +Example URL: + +``` + +https://learning.edx.org/c/course-v1:edX+DemoX.1+2T2019/YmxvY2/njuRCq/Optional_Example_Problem_Types/STEM_Problems/Code_Grader + ``` The fields definition and requirements ar as follows: From 3b2f91cd32efe9433137477da0aefb1f98c797f1 Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:44:12 -0400 Subject: [PATCH 2/3] Update 0009-courseware-url-shortening.md --- docs/decisions/0009-courseware-url-shortening.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/0009-courseware-url-shortening.md b/docs/decisions/0009-courseware-url-shortening.md index 8a52f62c..5a550a72 100644 --- a/docs/decisions/0009-courseware-url-shortening.md +++ b/docs/decisions/0009-courseware-url-shortening.md @@ -47,7 +47,7 @@ The fields definition and requirements ar as follows: * :sequenceSlug (optional) - `display_name` of the current sequence. * :unitSlug (optional) - `display_name` of the current unit -The slugs based on `display_name` are optional because not all blocks have an associated `display_name` attributes, most likely to occur in OLX imports. +The slugs based on `display_name` are optional because not all blocks have an associated `display_name` attributes, most likely to occur in OLX imports. The `sequenceHash` and `unitHash` will shorten their respective ids using `hashlib.blake2b`. `Blake2b` will reduce the length of the id so the encoded version can also be short. Hashing will be handled by `blake2b` because it is the fastest hashing function in the `hashlib` library and is the most compatible with `urlsafe_b64encode`. The hash will be generated and mapped in LMS. ## Consequences From 457dc4b279021b94f04101fc1ec430368556ae32 Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:52:48 -0400 Subject: [PATCH 3/3] Update 0009-courseware-url-shortening.md --- docs/decisions/0009-courseware-url-shortening.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/0009-courseware-url-shortening.md b/docs/decisions/0009-courseware-url-shortening.md index 5a550a72..5134daa6 100644 --- a/docs/decisions/0009-courseware-url-shortening.md +++ b/docs/decisions/0009-courseware-url-shortening.md @@ -47,7 +47,7 @@ The fields definition and requirements ar as follows: * :sequenceSlug (optional) - `display_name` of the current sequence. * :unitSlug (optional) - `display_name` of the current unit -The slugs based on `display_name` are optional because not all blocks have an associated `display_name` attributes, most likely to occur in OLX imports. The `sequenceHash` and `unitHash` will shorten their respective ids using `hashlib.blake2b`. `Blake2b` will reduce the length of the id so the encoded version can also be short. Hashing will be handled by `blake2b` because it is the fastest hashing function in the `hashlib` library and is the most compatible with `urlsafe_b64encode`. The hash will be generated and mapped in LMS. +The slugs based on `display_name` are optional because not all blocks have an associated `display_name` attributes, most likely to occur in OLX imports. The `sequenceHash` and `unitHash` will shorten their respective ids using `hashlib.blake2b`. `Blake2b` will reduce the length of the id so the encoded version can also be short. Hashing will be handled by `blake2b` because it is the fastest hashing function in the `hashlib` library. The hash will be generated and mapped in LMS. ## Consequences