Skip to content

Commit

Permalink
Merge branch 'MDL-32325-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Jun 7, 2012
2 parents 03a9479 + 50d24a3 commit 5874cc6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
26 changes: 13 additions & 13 deletions mod/glossary/formats/entrylist/entrylist_format.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <nolink> tags MDL-15555.
$entry->definition = '<span class="nolink">'.$entry->definition.'</span>';

echo '<table class="glossarypost entrylist">';
echo '<tr valign="top">';
echo '<td class="entry">';
echo '<b>';
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 ':</b> ';
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 '</td>';
echo '</tr>';
echo "</table>\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');
}


6 changes: 3 additions & 3 deletions mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,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('<span class="nolink">' . $entry->concept . '</span>', 3, 'nolink'), FORMAT_MOODLE, $options);

$text = html_writer::tag('h3', format_string($entry->concept));
if (!empty($entry->highlight)) {
$text = highlight($entry->highlight, $text);
}
Expand Down Expand Up @@ -1152,6 +1151,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
Expand Down
2 changes: 2 additions & 0 deletions mod/glossary/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
#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; }

0 comments on commit 5874cc6

Please sign in to comment.