Index: temp_moodle_dev/moodle/mod/glossary/view.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/glossary/view.php,v diff -u -r1.3 -r1.4 --- temp_moodle_dev/moodle/mod/glossary/view.php 11 Dec 2008 00:14:27 -0000 1.3 +++ temp_moodle_dev/moodle/mod/glossary/view.php 28 Oct 2009 07:32:01 -0000 1.4 @@ -19,8 +19,9 @@ $page = optional_param('page', 0,PARAM_INT); // Page to show (for paging purposes) $show = optional_param('show', '', PARAM_ALPHA); // [ concept | alias ] => mode=term hook=$show $returnurl = optional_param('returnUrl', '', PARAM_TEXT); // lams url to proceed to next in sequence - $editing = optional_param('editing', 0, PARAM_INT); // 1 if editing in Lams - $next = optional_param('next', 0, PARAM_INT); // 1 if new entry in Lams + $editing = optional_param('editing', 0, PARAM_INT); // 1 if editing in Lams + $next = optional_param('next', 0, PARAM_INT); // 1 if new entry in Lams + if (!empty($id)) { if (! $cm = get_coursemodule_from_id('glossary', $id)) { error("Course Module ID was incorrect"); @@ -54,8 +55,8 @@ /// redirecting if adding a new entry if ($tab == GLOSSARY_ADDENTRY_VIEW ) { - //if lams pass editing variable to know if the user is a teacher editing the activity - redirect("edit.php?id=$cm->id&mode=$mode&editing=$editing"); + //if lams pass editing variable to know if the user is a teacher editing the activity + redirect("edit.php?id=$cm->id&mode=$mode&editing=$editing"); } /// setting the defaut number of entries per page if not set @@ -214,16 +215,15 @@ default: $showcommonelements = 1; break; - } //if Lams print navigation buttons to finish editing the Glossary if($cm->is_lams==1&&$editing==1){ - include('showlamsfinish.php'); - } - $isteacher = has_capability('mod/glossary:preview', get_context_instance(CONTEXT_MODULE, $cm->id)); // indicates if is a teacher, useful in lams - if($isteacher&&$editing==0&&$cm->is_lams==1){//lams: if the teachers view the choice as a learner, display the next activity button so he hasn't to attempt the choice if he don't want to - include('showlamsnext.php'); + include('showlamsfinish.php'); } + $isteacher = has_capability('mod/glossary:preview', get_context_instance(CONTEXT_MODULE, $cm->id)); // indicates if is a teacher, useful in lams + if($isteacher&&$editing==0&&$cm->is_lams==1){//lams: if the teachers view the choice as a learner, display the next activity button so he hasn't to attempt the choice if he don't want to + include('showlamsnext.php'); + } /// Printing the heading $strglossaries = get_string("modulenameplural", "glossary"); $strglossary = get_string("modulename", "glossary"); @@ -240,14 +240,12 @@ require_capability('mod/glossary:approve', $context); $navigation = build_navigation($strwaitingapproval, $cm); - //we pass a new parameter to the function so it won't we printed if is_lams=1 print_header_simple(format_string($glossary->name), "", $navigation, "", "", true, update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm),false,'',false,$cm->is_lams); - + print_heading($strwaitingapproval); } else { /// Print standard header $navigation = build_navigation('', $cm); - //we pass a new parameter to the function so it won't we printed if is_lams=1 print_header_simple(format_string($glossary->name), "", $navigation, "", "", true, update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm),false,'',false,$cm->is_lams); } @@ -335,7 +333,9 @@ /// Info box if ( $glossary->intro && $showcommonelements ) { - print_box(format_text($glossary->intro), 'generalbox', 'intro'); + $options = new stdclass; + $options->para = false; + print_box(format_text($glossary->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro'); } /// Search box @@ -370,8 +370,7 @@ /// Show the add entry button if allowed if (has_capability('mod/glossary:write', $context) && $showcommonelements ) { echo '
'; - //if lams pass editing variable to know if the user is a teacher editing the activity - echo "
wwwroot/mod/glossary/edit.php?editing=$editing\">"; + echo "wwwroot/mod/glossary/edit.php?editing=$editing\">"; echo '
'; echo "id\" />"; echo '