Giter VIP home page Giter VIP logo

oohoo / moodle-block_course_search Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 7.0 238 KB

OOHOO Course Search do a search in all the content of a course including: - Section Name and description - All activities of the course (even all new plugins that you will setup on your moodle) based on the "name", "intro" and "content" fields The result appears as a list of links.

Home Page: http://oohoo.biz/

PHP 94.03% CSS 5.97%

moodle-block_course_search's People

Contributors

bretin avatar dddurand avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-block_course_search's Issues

Incorrect sql syntax in lib.php (postgresql)

This error consistently occurs with the latest version of Moodle 2.4.
Using postgres 9.1

Debug info: ERROR: argument of OR must be type boolean, not type integer
LINE 1: SELECT * FROM mdl_assign WHERE course=$1 AND (0 OR name LIK...
^

SELECT * FROM mdl_assign WHERE course=$1 AND (0 OR name LIKE $2 OR intro LIKE $3)
[array (
0 => 1,
1 => '%test%',
2 => '%test%',
)]

Error code: dmlreadexception

Stack trace:
line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 72 of /blocks/course_search/lib.php: call to pgsql_native_moodle_database->get_records_sql()
line 60 of /blocks/course_search/results.php: call to block_course_search_search_module()

Postgres specific fix:

diff --git a/blocks/course_search/lib.php b/blocks/course_search/lib.php
index 5a1aac1..7ce837d 100644
--- a/blocks/course_search/lib.php
+++ b/blocks/course_search/lib.php
@@ -31,7 +31,7 @@ function block_course_search_search_module($courseid, $module, $q)
global $CFG, $DB, $OUTPUT;

     $ret = '';
-    $sqlWere = 'course=? AND (0';
+    $sqlWere = 'course=? AND (false';
     $sqlParams = array($courseid);
     //At least one search field is needed
     $onefield = false;

Error in Moodle 2.4.3

Error reading from database

More information about this error
Debug info: Unknown column 'mdl_tab.intro' in 'field list'
SELECT mdl_tab_content.id as tabcontentid, mdl_tab.id as id,mdl_tab.name, mdl_tab.intro, mdl_tab.course, mdl_tab_content.tabname, mdl_tab_content.tabcontent
FROM mdl_tab_content
INNER JOIN mdl_tab ON mdl_tab_content.tabid = mdl_tab.id AND mdl_tab.course = ?
WHERE mdl_tab.name LIKE ? OR mdl_tab.intro LIKE ?
OR mdl_tab_content.tabname LIKE ? OR mdl_tab_content.tabcontent LIKE ?
[array (
0 => 1,
1 => '%lookup%',
2 => '%lookup%',
3 => '%lookup%',
4 => '%lookup%',
)]
Error code: dmlreadexception
Stack trace:

line 426 of \lib\dml\moodle_database.php: dml_read_exception thrown
line 1023 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 196 of \blocks\course_search\lib.php: call to mysqli_native_moodle_database->get_records_sql()
line ? of unknownfile: call to block_course_search_search_module_tab()
line 56 of \blocks\course_search\results.php: call to call_user_func()

Update for Moodle 4.x

Hi,

I was just wondering if you have any plans or interest in updating this plugin?

Best regards,

Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.