From: nfreear Date: Mon, 5 Nov 2007 15:22:22 +0000 (+0000) Subject: Fixes MDL-12029 "Glossary view needs heading markup + other accessibility fixes". X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=097d705e6d0416f63652836b30f49a9184fde66f;p=moodle.git Fixes MDL-12029 "Glossary view needs heading markup + other accessibility fixes". --- diff --git a/mod/glossary/formats/encyclopedia/encyclopedia_format.php b/mod/glossary/formats/encyclopedia/encyclopedia_format.php index 22e4fcd1db..e46ce0280f 100644 --- a/mod/glossary/formats/encyclopedia/encyclopedia_format.php +++ b/mod/glossary/formats/encyclopedia/encyclopedia_format.php @@ -16,17 +16,17 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode print_user_picture($user->id, $course->id, $user->picture); echo ''; - echo ''; + echo ''; echo ''; glossary_print_entry_concept($entry); - echo '
'; + echo ''; $fullname = fullname($user); $by->name = ''.$fullname.''; $by->date = userdate($entry->timemodified); echo ''.get_string('bynameondate', 'forum', $by).''; - echo ''; + echo ''; echo ''; glossary_print_entry_approval($cm, $entry, $mode); diff --git a/mod/glossary/formats/faq/faq_format.php b/mod/glossary/formats/faq/faq_format.php index 7069ca4d63..b4ed5cc706 100644 --- a/mod/glossary/formats/faq/faq_format.php +++ b/mod/glossary/formats/faq/faq_format.php @@ -8,16 +8,16 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hoo echo ''; echo ''; - echo ''; echo '
'; + echo ''; $entry->course = $course->id; echo '' . get_string('question','glossary') . ': '; glossary_print_entry_concept($entry); - echo '
'; + echo ''; echo '('.get_string('lastedited').': '. userdate($entry->timemodified).')'; - echo ''; + echo '
'; glossary_print_entry_approval($cm, $entry, $mode); diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 512756dd4c..fe100d0f9f 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -639,7 +639,7 @@ function glossary_print_entry($course, $cm, $glossary, $entry, $mode='',$hook='' //Default (old) print format used if custom function doesn't exist in format function glossary_print_entry_default ($entry) { - echo ''. strip_tags($entry->concept) . ': '; + echo '

'. strip_tags($entry->concept) . ':

'; $definition = $entry->definition; @@ -671,7 +671,7 @@ function glossary_print_entry_default ($entry) { function glossary_print_entry_concept($entry) { $options = new object(); $options->para = false; - $text = format_text('' . $entry->concept . '', FORMAT_MOODLE, $options); + $text = format_text('', FORMAT_MOODLE, $options); if (!empty($entry->highlight)) { $text = highlight($entry->highlight, $text); } @@ -839,6 +839,8 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h $return = ''; + // Differentiate links for each entry. + $altsuffix = ': '.$entry->concept; if (!$entry->approved) { $output = true; $return .= get_string('entryishidden','glossary'); @@ -847,7 +849,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h if (has_capability('mod/glossary:comment', $context) and $glossary->allowcomments) { $output = true; - $return .= ' '.get_string('addcomment','glossary').''; + $return .= ' '.get_string('addcomment','glossary').$altsuffix.''; } @@ -857,7 +859,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h $mainglossary = get_record('glossary','mainglossary',1,'course',$course->id); if ( $mainglossary ) { // if there is a main glossary defined, allow to export the current entry $output = true; - $return .= ' '.get_string('exporttomainglossary','glossary').''; + $return .= ' '.get_string('exporttomainglossary','glossary').$altsuffix.''; } } @@ -875,9 +877,9 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h $output = true; $return .= " id&mode=delete&entry=$entry->id&prevmode=$mode&hook=$hook\">\"" "; + $return .= "\" class=\"iconsmall\" alt=\"" . get_string("delete") .$altsuffix."\" /> "; - $return .= " id&e=$entry->id&mode=$mode&hook=$hook\">pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"" . get_string("edit") . "\" />"; + $return .= " id&e=$entry->id&mode=$mode&hook=$hook\">pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" />"; } elseif ( $importedentry ) { $return .= " " . get_string("exportedentry","glossary") . ""; } diff --git a/mod/glossary/view.php b/mod/glossary/view.php index e807ef08e0..bac4bad575 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -337,10 +337,10 @@ } else { $fullsearchchecked = ''; } - echo ''; + echo ''; echo ''; echo ''; - echo $strsearchindefinition; + echo ''; echo '
'; echo ''; @@ -439,11 +439,11 @@ print_user_picture($user->id, $course->id, $user->picture); $pivottoshow = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id))); } else { - echo ''; + echo ''; } - echo " $pivottoshow" ; - echo ''; + print_heading($pivottoshow); + echo ''; } } diff --git a/theme/standard/styles_fonts.css b/theme/standard/styles_fonts.css index c066026a79..25243fb0d2 100644 --- a/theme/standard/styles_fonts.css +++ b/theme/standard/styles_fonts.css @@ -734,8 +734,15 @@ body#mod-forum-index .generalbox .cell { .glossarypost .time { font-size: 0.8em; } -.concept { - font-weight: bold; +.glossarycategoryheader h2 { + margin: 0; +} +.glossarypost .concept h3 { + margin: 0; +} +.glossarypost .entryheader { + font-weight: normal; + text-align: left; } .glossarycomment .author { font-size: 0.8em;