Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27043

Global search configuration screen does memorize the fact that external programs are outside moodle directory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.9.11
    • Fix Version/s: None
    • Component/s: Global search
    • Labels:
      None
    • Environment:
      any

      Description

      In configuration screen of the Moodle's 1.9 Global Search there is a config option 'block_search_usemoodleroot' that specify whether the external programs (pdftotext, doctotext...) should be within moodledata directory of not.

      Or it looks like that this option is never correctly retrieved from database and always reset to 1 when updating the
      configuration thus leading to a lot of confusion when global search starts failing because the external programs
      are indeed outside moodledata (where they should normally be on a 'regular server', but may be not on an 'hosted moodle site')

      This is due to the following piece of code in blocks/search/config_global.html

      $usemoodleroot = (isset($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;
      $notusemoodleroot = (!isset($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;

      that should be :

      $usemoodleroot = (! empty($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;
      $notusemoodleroot =(empty($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;

      Indeed $usemoodleroot should be 'checked' if and only if $CFG->block_search_usemoodleroot is 1 (!empty) and
      not if it is set (has any value including 0)

      The same goes for $notusemoodleroot that should be 'checked' only if $CFG->block_search_usemoodleroot is 0 (empty)
      and not if is not set ...

      Cheers.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ppollet Patrick Pollet added a comment -

            see also http://moodle.org/mod/forum/discuss.php?d=85748 where that bug was already reported but never fixed

            Show
            ppollet Patrick Pollet added a comment - see also http://moodle.org/mod/forum/discuss.php?d=85748 where that bug was already reported but never fixed
            Hide
            nebgor Aparup Banerjee added a comment -

            1.9 general issues support has ended (see http://docs.moodle.org/dev/Releases).

            Please report this again if it is still an issue with versions 2.0 or greater.

            Show
            nebgor Aparup Banerjee added a comment - 1.9 general issues support has ended (see http://docs.moodle.org/dev/Releases ). Please report this again if it is still an issue with versions 2.0 or greater.
            Hide
            ppollet Patrick Pollet added a comment -

            Not fixed in Moodle 1.9 but just discarded
            see http://moodle.org/mod/forum/discuss.php?d=196033

            Show
            ppollet Patrick Pollet added a comment - Not fixed in Moodle 1.9 but just discarded see http://moodle.org/mod/forum/discuss.php?d=196033
            Hide
            ppollet Patrick Pollet added a comment -

            Not fixed in Moodle 1.9 but just discarded
            see http://moodle.org/mod/forum/discuss.php?d=196033 for recent requests

            Cheers

            Show
            ppollet Patrick Pollet added a comment - Not fixed in Moodle 1.9 but just discarded see http://moodle.org/mod/forum/discuss.php?d=196033 for recent requests Cheers
            Hide
            nebgor Aparup Banerjee added a comment -

            Hi Patrick,

            Global Search was a failed experimental project. It didn't survive into 2.2, the last of it was in 2.1. I suggest backing up and doing a test upgrade to 2.1 to see if that helps at all. There is a whole new Global Search being built from scratch now with this plan.

            In any case, all patches from the community for fixes to Global Search in stable branches are very welcome for consideration.

            cheers,
            Aparup

            Show
            nebgor Aparup Banerjee added a comment - Hi Patrick, Global Search was a failed experimental project. It didn't survive into 2.2 , the last of it was in 2.1. I suggest backing up and doing a test upgrade to 2.1 to see if that helps at all. There is a whole new Global Search being built from scratch now with this plan . In any case, all patches from the community for fixes to Global Search in stable branches are very welcome for consideration. cheers, Aparup
            Hide
            libertymoodle Luis de Vasconcelos added a comment -

            More info re: the Global Search rewrite is on:

            MDL-31989 and
            http://moodle.org/mod/forum/discuss.php?d=189023

            Don't forget to click the Vote button! ;->

            Show
            libertymoodle Luis de Vasconcelos added a comment - More info re: the Global Search rewrite is on: MDL-31989 and http://moodle.org/mod/forum/discuss.php?d=189023 Don't forget to click the Vote button! ;->

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: