Skip to content

Commit 2bb04d4

Browse files
committed
Update link and info text for quiz question saving.
1 parent 08f8da7 commit 2bb04d4

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/Controller/IssuesController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ public function saveIssue(
6565
$contentUpdated = false;
6666
}
6767

68-
$output->writeln("Review updated: ".($reviewUpdated ? 'true' : 'false'));
69-
$output->writeln("Content updated: ".($contentUpdated ? 'true' : 'false'));
70-
7168
if(!$reviewUpdated && !$contentUpdated) {
7269
throw new \Exception('form.error.same_html');
7370
}
@@ -123,6 +120,11 @@ public function saveIssue(
123120
$apiResponse->addMessage($e->getMessage(), 'error');
124121
}
125122

123+
$contentItem = $issue->getContentItem();
124+
if ($contentItem->getContentType() == "quiz_question") {
125+
$apiResponse->addMessage('msg.sync.quiz_question', 'alert');
126+
}
127+
126128
return new JsonResponse($apiResponse);
127129
}
128130

src/Lms/Canvas/CanvasLms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ protected function normalizeLmsContent(Course $course, $contentType, $lmsContent
785785
$out['updated'] = 'now';
786786
$out['body'] = $lmsContent['question_text'];
787787
$out['status'] = true;
788-
$out['url'] = "{$baseUrl}/quizzes/{$lmsContent['quiz_id']}";
788+
$out['url'] = "{$baseUrl}/quizzes/{$lmsContent['quiz_id']}/edit#questions_tab";
789789

790790
break;
791791
}

translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
"msg.file.replace.file_size": "File size too large. Please input a file of a size less than 10MB",
247247
"msg.sync.completed": "Course scan completed.",
248248
"msg.sync.course_inactive": "Course scan failed. Course is inactive.",
249+
"msg.sync.quiz_question": "The Quiz Question has been saved, but only as a draft. The Quiz must be manually saved in the LMS to update the content.",
249250
"msg.settings.updated": "Settings updated successfully.",
250251
"msg.settings.update_failed": "Failed to save settings. Please try again.",
251252
"msg.sync.error.api": "API call failed. Please refresh the page to try again.",

translations/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
"msg.file.replace.file_size": "El archivo es muy grande. Por favor, seleccione un archivo de menos de 10MB.",
247247
"msg.sync.completed": "Escaneo del curso completo.",
248248
"msg.sync.course_inactive": "Escaneo del curso fallado. El curso está inactivo.",
249+
"msg.sync.quiz_question": "TODO: The Quiz Question has been saved, but only as a draft. The Quiz must be manually saved in the LMS to update the content.",
249250
"msg.settings.updated": "Configuración actualizada correctamente.",
250251
"msg.settings.update_failed": "No se pudo guardar la configuración. Por favor, inténtalo de nuevo.",
251252
"msg.sync.error.api": "Error en la llamada a la API. Por favor, actualiza la pagina para intentarlo de nuevo.",

0 commit comments

Comments
 (0)