From: willcast Date: Wed, 1 Oct 2003 01:35:45 +0000 (+0000) Subject: - Exported entries with attachments are now properly shown everywhere. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b764feaa29757738867a9cf064f8b06549e59b66;p=moodle.git - Exported entries with attachments are now properly shown everywhere. --- diff --git a/lang/en/glossary.php b/lang/en/glossary.php index 79d4841b26..913e26ae63 100644 --- a/lang/en/glossary.php +++ b/lang/en/glossary.php @@ -21,9 +21,9 @@ $string['deleteentry'] = "Delete entry"; $string['deletingnoneemptycategory'] = "If a non empty category is deleted, its relations with their entries will also be deleted. If you wish to delete the entries, you will have to do so manually."; $string['displayformat'] = "Display format"; $string['displayformatdefault'] = "Simple, dictionary style"; -$string['displayformat1'] = "Full without author."; -$string['displayformat2'] = "Full with author."; -$string['displayformat3'] = "Encyclopedia."; +$string['displayformat1'] = "Full without author"; +$string['displayformat2'] = "Full with author"; +$string['displayformat3'] = "Encyclopedia"; $string['editentry'] = "Edit entry"; $string['editcategories'] = "Edit categories"; $string['entries'] = "Entries"; diff --git a/lang/es/glossary.php b/lang/es/glossary.php index 904f57997f..ee0a67c24d 100644 --- a/lang/es/glossary.php +++ b/lang/es/glossary.php @@ -20,8 +20,8 @@ $string['deleteentry'] = "Borrar entrada"; $string['deletingnoneemptycategory'] = "Si una categoría es eliminada por consiguiente su relación con las entradas también lo será. Si desea eliminar las entradas, tendrá que hacerlo manualmente."; $string['displayformat'] = "Formato de muestra de entradas"; $string['displayformatdefault'] = "Simple, estilo diccionario"; -$string['displayformat1'] = "Completo sin autor."; -$string['displayformat2'] = "Completo con autor."; +$string['displayformat1'] = "Completo sin autor"; +$string['displayformat2'] = "Completo con autor"; $string['displayformat3'] = "Enciclopedia"; $string['editentry'] = "Editar entrada"; $string['editcategories'] = "Editar categorías"; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 944e1c50ae..98465296ce 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -303,9 +303,9 @@ function glossary_search_entries($searchterms, $glossary, $includedefinition) { foreach ($searchterms as $searchterm) { - if (strlen($searchterm) < 2) { +/* if (strlen($searchterm) < 2) { continue; - } + }*/ if ($conceptsearch) { $conceptsearch.= " OR "; } @@ -470,15 +470,20 @@ function glossary_print_attachments($entry, $return=NULL, $align="left") { // if return=html, then return a html string. // if return=text, then return a text-only string. // otherwise, print HTML for non-images, and return image HTML - +// if attachment is an image, $align set its aligment. global $CFG; + + $newentry = $entry; + if ( $newentry->sourceglossaryid ) { + $newentry->glossaryid = $newentry->sourceglossaryid; + } - $filearea = glossary_file_area_name($entry); + $filearea = glossary_file_area_name($newentry); $imagereturn = ""; $output = ""; - if ($basedir = glossary_file_area($entry)) { + if ($basedir = glossary_file_area($newentry)) { if ($files = get_directory_list($basedir)) { $strattachment = get_string("attachment", "glossary"); $strpopupwindow = get_string("popupwindow");