Skip to content

Commit

Permalink
MDL-47494 ddmarker: merge multiple tries and hints. Group hints visually
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Chambers committed Jun 6, 2013
1 parent 7baa445 commit 80f0299
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
3 changes: 1 addition & 2 deletions question/type/ddmarker/edit_ddmarker_form.php
Expand Up @@ -132,8 +132,7 @@ protected function get_hint_fields($withclearwrong = false, $withshownumpartscor
$mform = $this->_form;

$repeated = array();
$repeated[] = $mform->createElement('header', 'hinthdr', get_string('hintn', 'question'));
$repeated[] = $mform->createElement('editor', 'hint', get_string('hinttext', 'question'),
$repeated[] = $mform->createElement('editor', 'hint', get_string('hintn', 'question'),
array('rows' => 5), $this->editoroptions);
$repeatedoptions['hint']['type'] = PARAM_RAW;

Expand Down
39 changes: 39 additions & 0 deletions question/type/ddmarker/styles.css
Expand Up @@ -102,3 +102,42 @@ form.mform fieldset#id_previewareaheader div.markertexts span.markertext {
position: absolute;
background: url([[pix:qtype_ddmarker|grid]]) repeat scroll 0 0;
}
/* Editing form. Style repeated elements*/
/*Top*/
body#page-question-type-ddmarker div[id^=fitem_id_][id*=hint_] {
background: #EEE;
margin-top: 0;
margin-bottom: 0;
padding-bottom: 5px;
padding-top: 5px;
border: 1px solid #BBB;
border-bottom: 0;
}
body#page-question-type-ddmarker div[id^=fitem_id_][id*=hint_] .fitemtitle {
font-weight: bold;
}
/* Middle */
body#page-question-type-ddmarker div[id^=fitem_id_][id*=hintoptions_],
body#page-question-type-ddmarker div[id^=fitem_id_][id*=hintshownumcorrect_] {
background: #EEE;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 5px;
padding-top: 5px;
border: 1px solid #BBB;
border-top: 0;
border-bottom: 0;
}
/* Bottom */
body#page-question-type-ddmarker div[id^=fitem_id_][id*=hintclearwrong_] {
background: #EEE;
margin-bottom: 2em;
margin-top: 0;
padding-bottom: 5px;
padding-top: 5px;
border: 1px solid #BBB;
border-top: 0;
}
body#page-question-type-ddmarker #fitem_id_penalty {
margin-bottom: 2em;
}

0 comments on commit 80f0299

Please sign in to comment.