One of LearnPack's most popular features is the ability to ask students to deliver the package as homework. Here, you can configure a package to allow or not allow delivery.
1{ 2 "delivery": { 3 "formats": ["no_delivery"] 4 } 5}
Before setting up your learn.json
, you must know which mime types the learners will be able to upload to deliver the project successfully. If you have a sample file, I recommend you upload it to mimetyp.io. To retrieve the particular string, you need to use a mime type.
Once you get the mime type, you have to specify it under the delivery.formats array like this:
1{ 2 "delivery": { 3 "formats": ["application/pdf"] 4 } 5}
The following are a few examples of different mime types:
1{ 2 "delivery": { 3 "instructions": { 4 "us": "Please drag your finished resume as a PDF file and upload it here", 5 "es": "Porfavor adjunta tu resume/CV listo y como archivo PDF" 6 }, 7 "formats": ["application/pdf"] 8 } 9}
Sometimes, we want to allow multiple file types; in this case, the learner can upload a file from MS Word or PDF.
1{ 2 "delivery": { 3 "instructions": { 4 "us": "Create a text document with the answers to the questions in the instructions", 5 "es": "Adjunta un documento con las respuestas a las preguntas" 6 }, 7 "formats": ["application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"] 8 } 9}
Some rate files like Packet Tracer .pka
files don't have a recognized mime type, in that case, you have to use application/octet-stream
followed by the file extension like this:
⚠️ Please note this is a last resort; we strongly recommend always using the mime-type when possible.
1{ 2 "delivery": { 3 "instructions": { 4 "en": "Please attach your finished pka file and upload it here", 5 "es": "Por favor adjunta tu archivo pka listo y cárgalo aquí" 6 }, 7 "formats": ["application/octet-stream,.pka"] 8 } 9}
The default format to deliver a project using LearnPack is by specifying a github repository URL link with the following structure:
1https:/<githun_username>/<github_repository>
But you can override that behavior by specifying a regex
string like this:
1{ 2 "delivery": { 3 "formats": ["url"], 4 "regex": "https://github.com/" 5 } 6}
The following is a list of examples of different regex for different URL formats.
1{ 2 "delivery": { 3 "instructions": { 4 "us": "Pase the URL of the Google Sheets template with the different strategies discussed during the game", 5 "es": "Agrega el URL al document de Google Sheets con las diferentes strategies discutidas" 6 }, 7 "formats": ["url"], 8 "regex": "https://docs.google.com/" 9 } 10}
Leave the regex
key with https://
only, and 4Geeks.com will ensure that the student specifies a URL from anywhere online.
1{ 2 "delivery": { 3 "instructions": { 4 "us": "Pase the URL of the Google Sheets template with the different strategies discussed during the game", 5 "es": "Agrega el URL al document de Google Sheets con las diferentes strategies discutidas" 6 }, 7 "formats": ["url"], 8 "regex": "https://" 9 } 10}