diff --git a/tools/challenge-helper-scripts/create-this-challenge.ts b/tools/challenge-helper-scripts/create-this-challenge.ts index 6c8cde101ad..c6e33c42ad5 100644 --- a/tools/challenge-helper-scripts/create-this-challenge.ts +++ b/tools/challenge-helper-scripts/create-this-challenge.ts @@ -17,13 +17,20 @@ const challengeId = new ObjectID().toString(); /***** Only change code below this line *****/ /* - * Fill in the variables below with the challenge info. Put the markdown you - * want to create in the `template` variable, leaving the frontmatter with the - * variables - be sure to escape all backticks in the markdown. + * Fill in the variables below with the challenge info. Run the script and paste + * the body of the challenge into the md file created by the script. + * + * NOTE: if the body of the challenge is not correctly formatted, see below for + * examples of the correct format. + * + * Finally dialogs have different frontmatter. After running the script, replace + * the audioPath with the videoId. Again, there is an example below. */ -const title = 'Temp Title'; -const dashedName = 'temp-title'; -const challengeType = '22'; + +const num = 1; +const title = 'Task ' + num; +const dashedName = 'task-' + num; +const challengeType = 22; const template = `--- id: ${challengeId} title: ${title} @@ -32,20 +39,107 @@ dashedName: ${dashedName} audioPath: curriculum/js-music-player/We-Are-Going-to-Make-it.mp3 --- +`; + +// template for fill in the blank lessons +/* + + + # --description-- -The word \`I'm\` is a contraction of \`I am\`. Contractions are a way to shorten common combinations of words, especially with verbs. +The word `I'm` is a contraction of `I am`. Contractions are a way to shorten common combinations of words, especially with verbs. # --fillInTheBlank-- ## --sentence-- -\`Hi, that's right! _ Tom McKenzie.\` +`Hi, that's right! _ Tom McKenzie.` ## --blanks-- -\`I'm\` -`; +`I'm` + +### --feedback-- + +Some `hints` for the learner. + +*/ + +// template for multiple choice lessons + +/* + + +# --description-- + +Sarah's response to Bob includes a specific phrase that shows she understands the problem he's facing. Recognizing such phrases is important in understanding communication cues in conversations. + +# --question-- + +## --text-- + +Which part of Sarah's sentence shows that she understands the problem? + +## --answers– + +I see + +--- + +Let's open an issue + +### --feedback-- + +While this part suggests a solution, this is not the part that directly indicates understanding. + +--- + +`then` + +### --feedback-- + +The word `then` is part of suggesting a solution, but it doesn't directly show understanding. + +--- + +`an issue` + +### --feedback-- + +The term `an issue` relates to the solution, not to the expression of understanding the problem. + +## --video-solution-- + +1 + +*/ + +// template for dialogs +/* +--- +id: 651dd3e06ffb500e3f2ce478 +title: "Dialogue 1: Maria Introduces Herself to Tom" +challengeType: 21 +videoId: nLDychdBwUg +dashedName: dialogue-1-maria-introduces-herself-to-tom +--- + +# --description-- + +Watch the video above to understand the context of the upcoming lessons. + +# --assignment-- + +Watch the video + +*/ /***** Only change code above this line *****/