Skip to content
Snippets Groups Projects
Commit 05aa369b authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Implement suggestions in issue #908.

parent 7108a6db
No related branches found
No related tags found
No related merge requests found
...@@ -535,8 +535,8 @@ $string['questiontests'] = 'Question tests'; ...@@ -535,8 +535,8 @@ $string['questiontests'] = 'Question tests';
$string['questiontestsfor'] = 'Question tests for seed {$a}'; $string['questiontestsfor'] = 'Question tests for seed {$a}';
$string['questiontestspass'] = 'All question tests passed.'; $string['questiontestspass'] = 'All question tests passed.';
$string['questiontestsdefault'] = '(Default)'; $string['questiontestsdefault'] = '(Default)';
$string['runquestiontests'] = 'Question tests & deployed variants'; $string['runquestiontests'] = 'STACK question dashboard';
$string['runquestiontests_help'] = 'The question tests unit-test the questions to ensure the behaviour matches expectations expressed by the teacher, and deployed variants ensure random versions seen by a student are pre-tested against the question tests. These are tools to help you create and test reliable questions and should be used in all cases a question will be used by students.'; $string['runquestiontests_help'] = 'The dashboard runs question tests which unit-test the questions to ensure the behaviour matches expectations expressed by the teacher, and deployed variants ensure random versions seen by a student are pre-tested against the question tests. These are tools to help you create and test reliable questions and should be used in all cases a question will be used by students. The dashboard also has numerous other STACK specific functions.';
$string['runquestiontests_alert'] = 'Question is missing tests or variants.'; $string['runquestiontests_alert'] = 'Question is missing tests or variants.';
$string['seethisquestioninthequestionbank'] = 'See this question in the question bank'; $string['seethisquestioninthequestionbank'] = 'See this question in the question bank';
$string['editquestioninthequestionbank'] = 'Edit this question'; $string['editquestioninthequestionbank'] = 'Edit this question';
......
...@@ -162,6 +162,8 @@ if ($canedit) { ...@@ -162,6 +162,8 @@ if ($canedit) {
$links[] = html_writer::link($chatlink, stack_string('sendgeneralfeedback')); $links[] = html_writer::link($chatlink, stack_string('sendgeneralfeedback'));
$links[] = html_writer::link($exportquestionlink, stack_string('exportthisquestion')) . $links[] = html_writer::link($exportquestionlink, stack_string('exportthisquestion')) .
$OUTPUT->help_icon('exportthisquestion', 'qtype_stack'); $OUTPUT->help_icon('exportthisquestion', 'qtype_stack');
$links[] = html_writer::link($question->qtype->get_tidy_question_url($question),
stack_string('tidyquestion'));
} }
$links[] = html_writer::link(new moodle_url('/question/type/stack/questiontestreport.php', $urlparams), $links[] = html_writer::link(new moodle_url('/question/type/stack/questiontestreport.php', $urlparams),
stack_string('basicquestionreport')) . $OUTPUT->help_icon('basicquestionreport', 'qtype_stack'); stack_string('basicquestionreport')) . $OUTPUT->help_icon('basicquestionreport', 'qtype_stack');
......
...@@ -159,14 +159,6 @@ class qtype_stack_renderer extends qtype_renderer { ...@@ -159,14 +159,6 @@ class qtype_stack_renderer extends qtype_renderer {
} }
$urlparams = array('questionid' => $question->id); $urlparams = array('questionid' => $question->id);
$links = array();
if (stack_user_can_edit_question($question)) {
$links[] = html_writer::link(
$question->qtype->get_tidy_question_url($question),
stack_string('tidyquestion'));
}
$urlparams['seed'] = $question->seed; $urlparams['seed'] = $question->seed;
// Quite honestly fellow developers I'm getting fed up of fixing live questions written by colleagues! // Quite honestly fellow developers I'm getting fed up of fixing live questions written by colleagues!
...@@ -174,6 +166,7 @@ class qtype_stack_renderer extends qtype_renderer { ...@@ -174,6 +166,7 @@ class qtype_stack_renderer extends qtype_renderer {
// Make these problems more obvious to authors, who don't yet understand what tests/variants are for. // Make these problems more obvious to authors, who don't yet understand what tests/variants are for.
// Alert a teacher to questions without tests or deployed variants. // Alert a teacher to questions without tests or deployed variants.
$testscases = question_bank::get_qtype('stack')->load_question_tests($question->id); $testscases = question_bank::get_qtype('stack')->load_question_tests($question->id);
$links = array();
if (($question->has_random_variants() && count($question->deployedseeds) == 0) || if (($question->has_random_variants() && count($question->deployedseeds) == 0) ||
count($testscases) == 0) { count($testscases) == 0) {
$links[] = html_writer::link( $links[] = html_writer::link(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment