Hi,
I was trying to figure out this issue and I have found out how it was generated.
Just want to share with the community on this complex hash function that was used in this export feature.
From the opensource codes here https://github.com/instructure/canvas-lms/blob/master/lib/cc/cc_helper.rb#L116
you will be able to deep dive into the linkages and find out that the hash string is a "entity_" + id.
This id is a global id (or rather shard id) % local id.
To find out your shard id
1. Login to your Canvas Portal, go into any course, and do a content export (probably Quiz in this case).
2. There will be a job (link) for you to download the export. However, highlight the link and see that there is a JWT in the verifier parameter in the link behind.
3. Go to a JWT decoder page like https://jwt.io/ , and decode the JWT, you will see something like a 14 bit integer in the id parameter in the payload. (e.g. xxxx0000000yyyyyy).
4. The XXXX would be the indicator of your shard id, and the yyyy is your local id (the Quiz Id in this case since we are exporting a quiz), or the primary key of any objects that you are trying to find out the hash.
5. Lastly, you just have to do a ruby hash (Digest::MD5.hexdigest("quizzes:quiz_xxxx0000000yyyyyy"), and you will get the matching identifier that is in the XML of the export.
Hope this helps.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.