mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
MDL-47695 quiz editing: descritions don't have a max mark!
So don't show the UI for editing it. Also, don't show non-functional page split/join icons after the quiz has been attempted.
This commit is contained in:
parent
b49de5d930
commit
97ef7ea2ce
2 changed files with 18 additions and 2 deletions
|
@ -380,7 +380,7 @@ class edit_renderer extends \plugin_renderer_base {
|
||||||
|
|
||||||
// Page split/join icon.
|
// Page split/join icon.
|
||||||
$joinhtml = '';
|
$joinhtml = '';
|
||||||
if (!$structure->is_last_slot_in_quiz($question->slot)) {
|
if ($structure->can_be_edited() && !$structure->is_last_slot_in_quiz($question->slot)) {
|
||||||
$joinhtml = $this->page_split_join_button($structure->get_quiz(),
|
$joinhtml = $this->page_split_join_button($structure->get_quiz(),
|
||||||
$question, !$structure->is_last_slot_on_page($question->slot));
|
$question, !$structure->is_last_slot_on_page($question->slot));
|
||||||
}
|
}
|
||||||
|
@ -759,6 +759,16 @@ class edit_renderer extends \plugin_renderer_base {
|
||||||
* @return string HTML to output.
|
* @return string HTML to output.
|
||||||
*/
|
*/
|
||||||
public function marked_out_of_field($quiz, $question) {
|
public function marked_out_of_field($quiz, $question) {
|
||||||
|
if ($question->length == 0) {
|
||||||
|
$output = html_writer::span('',
|
||||||
|
'instancemaxmark decimalplaces_' . quiz_get_grade_format($quiz));
|
||||||
|
|
||||||
|
$output .= html_writer::span(
|
||||||
|
$this->pix_icon('spacer', '', 'moodle', array('class' => 'editicon visibleifjs', 'title' => '')),
|
||||||
|
'editing_maxmark');
|
||||||
|
return html_writer::span($output, 'instancemaxmarkcontainer infoitem');
|
||||||
|
}
|
||||||
|
|
||||||
$output = html_writer::span(quiz_format_question_grade($quiz, $question->maxmark),
|
$output = html_writer::span(quiz_format_question_grade($quiz, $question->maxmark),
|
||||||
'instancemaxmark decimalplaces_' . quiz_get_grade_format($quiz),
|
'instancemaxmark decimalplaces_' . quiz_get_grade_format($quiz),
|
||||||
array('title' => get_string('maxmark', 'quiz')));
|
array('title' => get_string('maxmark', 'quiz')));
|
||||||
|
@ -766,7 +776,7 @@ class edit_renderer extends \plugin_renderer_base {
|
||||||
$output .= html_writer::span(
|
$output .= html_writer::span(
|
||||||
html_writer::link(
|
html_writer::link(
|
||||||
new \moodle_url('#'),
|
new \moodle_url('#'),
|
||||||
$this->pix_icon('t/editstring', '', 'moodle', array('class' => 'smallicon visibleifjs', 'title' => '')),
|
$this->pix_icon('t/editstring', '', 'moodle', array('class' => 'editicon visibleifjs', 'title' => '')),
|
||||||
array(
|
array(
|
||||||
'class' => 'editing_maxmark',
|
'class' => 'editing_maxmark',
|
||||||
'data-action' => 'editmaxmark',
|
'data-action' => 'editmaxmark',
|
||||||
|
|
|
@ -622,6 +622,12 @@ table.quizreviewsummary td.cell {
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
margin: 0.4em;
|
margin: 0.4em;
|
||||||
}
|
}
|
||||||
|
#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer .editicon {
|
||||||
|
width: 13px;
|
||||||
|
}
|
||||||
|
#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer.infoitem {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer form {
|
#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer form {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue