Skip to content
Snippets Groups Projects
Commit 4339ebba authored by michael.minelli's avatar michael.minelli
Browse files

Exercise/Assignment => Change sentences

parent 80aa5046
No related branches found
No related tags found
No related merge requests found
...@@ -61,14 +61,15 @@ class AssignmentCreateCommand extends CommanderCommand { ...@@ -61,14 +61,15 @@ class AssignmentCreateCommand extends CommanderCommand {
// Create the assignment // Create the assignment
{ {
console.log(chalk.cyan('Please wait while we are creating the assignment...')); console.log(chalk.cyan('Please wait while we are creating the assignment (approximately 10 seconds)...'));
try { try {
const assignment: Assignment = await DojoBackendManager.createAssignment(options.name, members, templateIdOrNamespace); const assignment: Assignment = await DojoBackendManager.createAssignment(options.name, members, templateIdOrNamespace);
const oraInfo = (message: string) => { const oraInfo = (message: string) => {
ora({ ora({
text: message, indent: 4 text : message,
indent: 4
}).start().info(); }).start().info();
}; };
......
...@@ -40,7 +40,8 @@ class ExerciseCreateCommand extends CommanderCommand { ...@@ -40,7 +40,8 @@ class ExerciseCreateCommand extends CommanderCommand {
ora('Checking assignment:').start().info(); ora('Checking assignment:').start().info();
const assignmentGetSpinner: ora.Ora = ora({ const assignmentGetSpinner: ora.Ora = ora({
text: 'Checking if assignment exists', indent: 4 text : 'Checking if assignment exists',
indent: 4
}).start(); }).start();
assignment = await DojoBackendManager.getAssignment(options.assignment); assignment = await DojoBackendManager.getAssignment(options.assignment);
if ( !assignment ) { if ( !assignment ) {
...@@ -50,7 +51,8 @@ class ExerciseCreateCommand extends CommanderCommand { ...@@ -50,7 +51,8 @@ class ExerciseCreateCommand extends CommanderCommand {
assignmentGetSpinner.succeed(`Assignment "${ options.assignment }" exists`); assignmentGetSpinner.succeed(`Assignment "${ options.assignment }" exists`);
const assignmentPublishedSpinner: ora.Ora = ora({ const assignmentPublishedSpinner: ora.Ora = ora({
text: 'Checking if assignment is published', indent: 4 text : 'Checking if assignment is published',
indent: 4
}).start(); }).start();
if ( !assignment.published ) { if ( !assignment.published ) {
assignmentPublishedSpinner.fail(`Assignment "${ assignment.name }" isn't published`); assignmentPublishedSpinner.fail(`Assignment "${ assignment.name }" isn't published`);
...@@ -61,14 +63,15 @@ class ExerciseCreateCommand extends CommanderCommand { ...@@ -61,14 +63,15 @@ class ExerciseCreateCommand extends CommanderCommand {
//Create the exercise //Create the exercise
{ {
console.log(chalk.cyan('Please wait while we are creating the exercise...')); console.log(chalk.cyan('Please wait while we are creating the exercise (approximately 10 seconds)...'));
try { try {
const exercise: Exercise = await DojoBackendManager.createExercise((assignment as Assignment).name, members); const exercise: Exercise = await DojoBackendManager.createExercise((assignment as Assignment).name, members);
const oraInfo = (message: string) => { const oraInfo = (message: string) => {
ora({ ora({
text: message, indent: 4 text : message,
indent: 4
}).start().info(); }).start().info();
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment