diff --git a/mod/glossary/formats/entrylist/entrylist_format.php b/mod/glossary/formats/entrylist/entrylist_format.php index 4aa37c88e5e..6a352485354 100644 --- a/mod/glossary/formats/entrylist/entrylist_format.php +++ b/mod/glossary/formats/entrylist/entrylist_format.php @@ -42,25 +42,25 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode='' } function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) { - - //The print view for this format is different from the normal view, so we implement it here completely - global $CFG, $USER; - - //Take out autolinking in definitions un print view + // TODO use tags MDL-15555. $entry->definition = ''.$entry->definition.''; - echo ''; - echo ''; - echo ''; - echo ''; - echo "
'; - echo ''; + echo html_writer::start_tag('table', array('class' => 'glossarypost entrylist mod-glossary-entrylist')); + echo html_writer::start_tag('tr'); + echo html_writer::start_tag('td', array('class' => 'entry mod-glossary-entry')); + echo html_writer::start_tag('div', array('class' => 'mod-glossary-concept')); glossary_print_entry_concept($entry); - echo ': '; + echo html_writer::end_tag('div'); + echo html_writer::start_tag('div', array('class' => 'mod-glossary-definition')); glossary_print_entry_definition($entry, $glossary, $cm); + echo html_writer::end_tag('div'); + echo html_writer::start_tag('div', array('class' => 'mod-glossary-lower-section')); glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false); - echo '
\n"; + echo html_writer::end_tag('div'); + echo html_writer::end_tag('td'); + echo html_writer::end_tag('tr'); + echo html_writer::end_tag('table'); } diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 4cbc64c09e3..9066da99c9b 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -971,9 +971,8 @@ function glossary_print_entry_default ($entry, $glossary, $cm) { */ function glossary_print_entry_concept($entry, $return=false) { global $OUTPUT; - $options = new stdClass(); - $options->para = false; - $text = format_text($OUTPUT->heading('' . $entry->concept . '', 3, 'nolink'), FORMAT_MOODLE, $options); + + $text = html_writer::tag('h3', format_string($entry->concept)); if (!empty($entry->highlight)) { $text = highlight($entry->highlight, $text); } @@ -1015,6 +1014,7 @@ function glossary_print_entry_definition($entry, $glossary, $cm) { $options->trusted = $entry->definitiontrust; $options->context = $context; $options->overflowdiv = true; + $text = format_text($definition, $entry->definitionformat, $options); // Stop excluding concepts from autolinking diff --git a/mod/glossary/styles.css b/mod/glossary/styles.css index d7c005bcff1..57c979c4f97 100644 --- a/mod/glossary/styles.css +++ b/mod/glossary/styles.css @@ -27,5 +27,6 @@ #page-mod-glossary-view table.glossarycategoryheader th {padding:0px;} #page-mod-glossary-showentry #page-content {min-width:600px;} +#page-mod-glossary-print .mod-glossary-entrylist .mod-glossary-entry { vertical-align: top; } -#glossaryoverlayprogress {position:fixed;top:50%;width:100%;text-align:center;} \ No newline at end of file +#glossaryoverlayprogress {position:fixed;top:50%;width:100%;text-align:center;}