Skip to content

Commit

Permalink
Open-Ended Content instead of the Header HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
kreut committed Oct 5, 2022
1 parent 7fc9f97 commit 5c73db8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/LibretextController.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ public function getHeaderHtml($question_id)
if ($question) {
$non_technology_html = $question->non_technology_html;
} else {
$non_technology_html = "We could not locate the Header HTML for Question $question_id";
$non_technology_html = "We could not locate the Open-Ended Content for Question $question_id";
}
}
}
} catch (Exception $e) {
$non_technology_html = "We were not able to retrieve the Header HTML for Question $question_id. Please contact us for assistance.";
$non_technology_html = "We were not able to retrieve the Open-Ended Content for Question $question_id. Please contact us for assistance.";
$h = new Handler(app());
$h->report($e);
}
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/QuestionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function __construct()
'Assignment',
"Template",
'Topic',
"Header HTML",
"Open-Ended Content",
"Auto-Graded Technology",
"Technology ID/File Path",
"Author*",
Expand Down Expand Up @@ -574,7 +574,7 @@ public function validateCSVBulkImport(Request $request,
$messages[] = "Row $row_num is missing a Title.";
}

if ($import_template === 'advanced' && $question['Question Type*'] === 'exposition' && !$question['Header HTML']) {
if ($import_template === 'advanced' && $question['Question Type*'] === 'exposition' && !$question['Open-Ended Content']) {
$messages[] = "Row $row_num is an exposition type question and is missing the source.";
}

Expand All @@ -588,7 +588,7 @@ public function validateCSVBulkImport(Request $request,
$messages[] = "Row $row_num is an exposition type question and should not have Text Question, Answer, Solution, or Hint.";
}

if ($import_template === 'advanced' && $question['Question Type*'] === 'assessment' && !$question['Header HTML'] && !$question['Auto-Graded Technology']) {
if ($import_template === 'advanced' && $question['Question Type*'] === 'assessment' && !$question['Open-Ended Content'] && !$question['Auto-Graded Technology']) {
$messages[] = "Row $row_num is an assessment and needs either an auto-graded technology or source.";
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/StoreQuestionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ function messages()
$messages['webwork_code.required'] = 'WeBWork code is required.';
}
$messages['non_technology_text.required'] = $this->question_type === 'assessment'
? 'Either the header HTML field or the technology field is required.'
: 'The header HTML field is required.';
? 'Either the Open-Ended Content field or the technology field is required.'
: 'The Open-Ended Content field is required.';
$messages['folder_id.required'] = "The folder is required.";

foreach ($this->all() as $key => $value) {
Expand Down

0 comments on commit 5c73db8

Please sign in to comment.