Git Product home page Git Product logo

intelliboard / intelliboard Goto Github PK

View Code? Open in Web Editor NEW
23.0 9.0 34.0 11.3 MB

IntelliBoard.net offers analytic and reporting services to education communities and institutions who use Moodle as their Learning Management System. We help extract the statistical data gathered available in Moodle and present it on a single dashboard in the form of printable charts, graphs, and multiple formatted reports.

Home Page: https://intelliboard.net/

PHP 94.46% JavaScript 3.29% CSS 1.10% Mustache 1.15%

intelliboard's Introduction

IntelliBoard plugin

Information

To use this plugin, please register at www.intelliboard.net and follow instructions in the Settings page. IntelliBoard.net is built to work with any LMS designed in Moodle with the goal to deliver educational data analytics to single dashboard instantly. With power to turn this analytical data into simple and easy to read reports, IntelliBoard.net will become your primary reporting tool.

To disable/hide SQL reports please use config - $CFG->intelliboardsql = false;

Installation

  1. Download the plugin from https://github.com/intelliboard/intelliboard
  2. Install the plugin as local plugin
  3. Enable web services in your Moodle
  4. Enable REST/SOAP protocol in your Moodle
  5. Add authorized users to use IntelliBoard.net web service
  6. Create new token for your authorized user. Make sure IntelliBoard.net service is selected.
  7. Login to IntelliBoard.net
  8. Go to Settings - Servers - Add Moodle Connection
  9. Enter requested information

intelliboard's People

Contributors

anatoliykochnev avatar intelliboard avatar sayoder avatar tarasleshko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intelliboard's Issues

column "e.instanceid" must appear in the GROUP BY clause or be used in an aggregate function

I get this error message when using Intelliboard on Moodle 3.9.3 with PostgreSQL:

Default exception handler: Error reading from database Debug: ERROR:  column "e.instanceid" must appear in the GROUP BY clause or be used in an aggregate function
LINE 22:                             e.instanceid AS courseid, 
                                     ^
Error code: dmlreadexception
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 920 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 1624 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
* line 1697 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
* line 1907 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
* line 1964 of /lib/tablelib.php: call to moodle_database->count_records_sql()
* line 2019 of /lib/tablelib.php: call to table_sql->query_db()
* line 278 of /local/intelliboard/instructor/courses.php: call to table_sql->out()

I've seen that there are three group by clausesto fix, this fix seems to work for us:

#42

Broken Activation Link and Unnecessarily Generated Password

I just registered to intelliboard with my Google account and got a confirmation e-mail. However, the confirmation link is broken in the email:

Dear Mustafa,

Thank you for registering at IntelliBoard.net. We have created your account but you need to verify it before you can start using it.
To activate the account click on the following link or copy-paste it in your browser:
https://intelliboard.net/sign-up/activate?token=

Your email is: [email protected]
Your passwowrd is: oauth2Password

Thank you and look forward to see you at https://intelliboard.net/ soon.

IntelliBoard Team

Beside this, it seem like intelliboard is generating a password for users even if they get registered with Google account. If you are sending the same password for all users, this is a huge security failure.

"override class file does not exist" error when trying to uninstall

When attempting to uninstall latest local_intelliboard version 2020122603 on Totara 11/12 or version 2020122604 on Moodle 3.5/3.7/3.9 the following error is encountered:

Coding error detected, it must be fixed by a programmer: The override class file does not exist.

More information about this error
Debug info:
Error code: codingerror
Stack trace:
    line 486 of /cache/classes/definition.php: coding_exception thrown
    line 526 of /cache/classes/helper.php: call to cache_definition::load()
    line 486 of /cache/classes/helper.php: call to cache_helper::purge_store()
    line 1860 of /lib/upgradelib.php: call to cache_helper::purge_all()
    line 402 of /admin/index.php: call to upgrade_noncore()

This must be resolved before we can approve any new version for client use, as plugins need to be able to uninstall without negatively affecting the site, and this error prevents other other plugin installation/upgrade actions from working until it is manually fixed. Noting that our support department found the error can manually be resolved after it is encountered by deleting the contents under $MOODLEDATA/cache/ and removing the cached configuration file from $MOODLEDATA/muc/config.php, so hopefully this will give some info on to how to fix this bug since it appears to have something to do with how caching is handled during plugin install/uninstall.

Official API documentation?

Hi,

This looks like a copy/hack of the BBB plugin, still maintaining a lot of variables and database parameters names from the BigBlueButton plugin.

If I want to integrate Intelliboard into another LMS, is there an official API documentation page somewhere that I can use rather to try and debunk what is needed and what is not in this plugin in order to avoid carrying all that BBB stuff with me?

MACOSX folder

The 4.7.1 (2017062600) version of the plugin from Moodle.org contains a MAXOSX in the root directory which breaks our installation procedure, can you fix it please.

PHP 7 privacy provider included.

You have added a privacy provider class that requires php 7 and will cause a fatal error in Moodle 3.3 and in Moodle 3.1/3.2 the class probably shouldn't even be there.

If you want to use the PHP 7 stuff you must branch your code and provide a different version for Moodle 3.3.

If you want to maintain the same privacy class for Moodle 3.3 and your master branch you must use the polyfill:
https://docs.moodle.org/dev/Privacy_API#What_to_do_if_you_have_one_plugin_that_supports_multiple_branches

Errors and Warnings on Postgres

Hi, I'm Cameron from the MoodleCloud team. We're running the latest commit (e5de0ab) on our staging server. I've run through most of the reports and a few of them are still generating errors/warnings. Below is a summary of the files and the errors I saw:

https://au-app.intelliboard.net/reports/view/instructoractivityengagementdetail

Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n
Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 343 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 3197 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report81()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n

https://au-app.intelliboard.net/reports/view/InstructorDashboardUtilization

PHP Notice: Undefined variable: sql_filter in /var/www/moodle361t/local/intelliboard/externallib.php on line 2094

https://au-app.intelliboard.net/reports/view/MoodleroomsNewOutcomes
https://au-app.intelliboard.net/reports/view/OutcomesAttemptReport
https://au-app.intelliboard.net/reports/view/certificatesgranted
https://au-app.intelliboard.net/reports/view/expiredcertificates
https://au-app.intelliboard.net/reports/view/ChecklistActivityReport?course=3
https://au-app.intelliboard.net/reports/view/ForumActivityDetails
https://au-app.intelliboard.net/reports/view/questionnairedata

Database transaction aborted automatically in /var/www/moodle361t/webservice/rest/server.php

https://au-app.intelliboard.net/reports/view/AttendanceOverview

PHP Notice: Trying to get property 'debug' of non-object in /var/www/moodle361t/local/intelliboard/externallib.php on line 338

https://au-app.intelliboard.net/reports/view/LessonAnswers

Debugging: Did you remember to make the first column something unique in your call to get_records? Duplicate value '3' found in column 'id'. in \n* line 885 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()\n* line 345 of /local/intelliboard/externallib.php: call to pgsql_native_moodle_database->get_records_sql()\n* line 1482 of /local/intelliboard/externallib.php: call to local_intelliboard_external->get_report_data()\n* line 154 of /local/intelliboard/externallib.php: call to local_intelliboard_external->report18_graph()\n* line 1415 of /webservice/lib.php: call to local_intelliboard_external::database_query()\n* line 1261 of /webservice/lib.php: call to webservice_base_server->execute()\n* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()\n

https://au-app.intelliboard.net/reports/view/poodll_plugin_instances
https://au-app.intelliboard.net/reports/view/poodll_recording_locations
https://au-app.intelliboard.net/reports/view/poodll_recordings

PHP Notice: Trying to get property 'debug' of non-object in /var/www/moodle361t/local/intelliboard/externallib.php on line 338

Remove deprecated 'requirelockingwrite' => true in cache.php

The requirelockingwrite locking mode was a liability in core generally and has been deprecated and completely removed without a deprecation period:

https://github.com/intelliboard/intelliboard/blob/master/db/caches.php#L42C9-L42C38

++ The cache option requirelockingwrite is deprecated and now has no effect. Consider removing the option, or using requirelockingbeforewrite ++

So this plugin is now producing deprecation warnings in various places.

Error in behat and unit tests

Hi, When our automated tests running, we have the following errors :

286. debugging() message/s found:
    parent does not exist!
    line 908 of /lib/adminlib.php: call to debugging()
    line 34 of /local/intelliboard/settings.php: call to admin_category->add()
    line 67 of /lib/classes/plugininfo/local.php: call to include()
    line 492 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()
    line 6650 of /lib/adminlib.php: call to require()
    line 3609 of /lib/navigationlib.php: call to admin_get_root()
    line 3470 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
    line 719 of /lib/pagelib.php: call to settings_navigation->initialise()
    line 768 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
    line 135 of /blocks/settings/block_settings.php: call to moodle_page->__get()
    line 294 of /blocks/moodleblock.class.php: call to block_settings->get_content()
    line 236 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 1016 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1068 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 361 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
    line 45 of /theme/clean/layout/columns3.php: call to core_renderer->standard_head_html()
    line 877 of /lib/outputrenderers.php: call to include()
    line 807 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 167 of /my/index.php: call to core_renderer->header()

We use the 2.7.3 version of Moodle. Thanks !

Error when ordering

Hi,

When I am on the courses tab and click on the Learners actions, and try to order the course list by the "Average Time Spent Per Student" i get this error:

ERROR:  column "avg_timespend" does not exist
LINE 58:                 ORDER BY avg_timespend ASC LIMIT 10
                                  ^
SELECT
                t.*
                FROM (SELECT CONCAT(ra.userid,'_',c.id) as id,
                         ra.userid AS userid,
                         c.id as courseid,
                         ra.timemodified as enrolled,
                         ul.timeaccess AS timeaccess,
                         ROUND((CASE WHEN g.rawgrademax > 0 THEN (g.finalgrade/g.rawgrademax)*100 ELSE g.finalgrade END), 0) AS grade,
                         cc.timecompleted AS timecompleted,
                         CONCAT(u.firstname, ' ', u.lastname) AS learner,
                         u.email,
                         u.firstname AS firstname,
                         u.lastname AS lastname,
                         u.alternatename AS alternatename,
                         u.middlename AS middlename,
                         u.lastnamephonetic AS lastnamephonetic,
                         u.firstnamephonetic AS firstnamephonetic,
                         l.timespend AS timespend,
                         l.visits AS visits,
                         cmc.progress AS progress,
                         '' as actions
                    FROM (SELECT ra.userid, 
                                 cx.instanceid AS courseid, 
                                 MIN(ra.timemodified) AS timemodified 
                            FROM m_role_assignments ra
                            JOIN m_context cx ON cx.id = ra.contextid AND cx.contextlevel = 50
                           WHERE cx.instanceid = $1 AND ra.roleid = $2
                        GROUP BY ra.userid, cx.instanceid
                         ) ra
                    JOIN m_user u ON u.id = ra.userid
                    JOIN m_course c ON c.id = ra.courseid
               LEFT JOIN m_grade_items gi ON gi.itemtype = 'course' AND gi.courseid = c.id
               LEFT JOIN m_user_lastaccess ul ON ul.courseid = c.id AND ul.userid = u.id
               LEFT JOIN m_course_completions cc ON cc.course = c.id AND cc.userid = ra.userid
               LEFT JOIN m_grade_grades g ON g.userid = u.id AND g.itemid = gi.id AND g.finalgrade IS NOT NULL
               
               LEFT JOIN (SELECT ue.userid, MIN(ue.status) AS status, e.courseid
                            FROM m_user_enrolments ue
                            JOIN m_enrol e ON ue.enrolid = e.id AND e.courseid = $3
                        GROUP BY ue.userid, e.courseid
               ) enr ON enr.userid = u.id

               LEFT JOIN (SELECT cmc.userid, COUNT(DISTINCT cmc.id) as progress
                            FROM m_course_modules_completion cmc
                            JOIN m_course_modules cm ON cm.visible = 1 AND cmc.coursemoduleid = cm.id AND
                                                        cm.completion > 0 AND cm.course = $4
                           WHERE cm.id > 0  AND cmc.completionstate IN(1,2) 
                        GROUP BY cmc.userid
               ) cmc ON cmc.userid = u.id

               LEFT JOIN (SELECT t.userid,t.courseid, sum(t.timespend) as timespend, sum(t.visits) as visits
                            FROM m_local_intelliboard_tracking t
                        GROUP BY t.courseid, t.userid
               ) l ON l.courseid = c.id AND l.userid = u.id
                         
                   WHERE ra.courseid > 0  AND u.deleted = 0 AND u.suspended = 0 AND u.username <> 'guest' AND enr.status = 0  AND c.id IN (23306,26163,26792,28563,30632,30700)) t
                WHERE t.userid > 0
                ORDER BY avg_timespend ASC LIMIT 10
-- line 2069 of /lib/tablelib.php: call to pgsql_native_moodle_database->get_records_sql()

Error code: dmlreadexception
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 977 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 2069 of /lib/tablelib.php: call to pgsql_native_moodle_database->get_records_sql()
* line 2091 of /lib/tablelib.php: call to table_sql->query_db()
* line 278 of /local/intelliboard/instructor/courses.php: call to table_sql->out()

I guess it makes no sense to order a list by the average (it will be the same for all of them), so instead of fixing the SQL itself it may be a better idea to disable the ordering option to that column.

It happens to us on Moodle 3.11.3 on PostreSQL with local_intelliboard 7.0.0 (2021090604)

MySQL specific functions used in almost all queries

Hi, I'm from the MoodleCloud team. We've been told that the intelliboard plugin is now compatible with Postgres, however, looking at the file: externallib.php there are over 100 uses of the function FROM_UNIXTIME - which is a MySQL specific function. We also spotted PERIOD_DIFF and DATE_FORMAT - both of which are not available in Postgres.

It looks to us as though this plugin will not work on a Postgres Moodle site. Can you confirm whether or not Postgres is supported?

Cheers,
Cameron Ball
[email protected]
Analyst Developer, Moodle HQ

Note: I am submitting this on behalf of Cameron

Users are not able to access Intelliboard dashboards

Users can not access the dashboards when any change is saved in Intelliboard moodle-settings page (/admin/settings.php?section=local_intelliboard) the following message is displayed ('You do not have permission to view this page. Please contact your Administrator for assistance.'). However, if the Moodle site 'Connection Information' form in the Intelliboard app is saved users are able to access the dashboards even if their roles are not allowed to do it.

Pre-conditions:

  • Intelliboard plugin is installed and configured in the Moodle site
  • There is access to Intelliboard app 'https://app.intelliboard.net/'
  • Connection in intelliboard app was created and configured properly

Steps to replicate:

  • In Moodle site, log in as Admin

  • Navigate to Site Administration > Plugins > Local plugins > Intelliboard.net Plugin > Intelliboard.net Plugin

  • Perform any change in the settings, e.g,
    ** in 'Student roles' section define 'Guest' as the only role allowed
    ** in 'Teacher roles' section define 'Editing Teacher' and 'Manager' as the only roles allowed

  • Save changes

  • Navigate to /local/intelliboard/competencies/index.php

  • Check you are not able to access the 'Competency' dashboard, the following message is displayed: 'You do not have permission to view this page. Please contact your Administrator for assistance.'

  • Log out

  • In Moodle site, Log in as a Student

  • Navigate to 'Learner dashboard'

  • Check student can not access the dashboard content, the following message is displayed: 'You do not have permission to view this page. Please contact your Administrator for assistance.'

  • Log in 'https://app.intelliboard.net/'

  • Navigate to Settings and Options > Servers

  • Enter on your Moodle site Connection

  • Click on save, do not change any setting

  • In Moodle site, Log in as a Student

  • Navigate to 'Learner dashboard'

  • Check student can access the dashboard content even if his role is not allowed to do it

Expected - The users always should be able to access the dashboards according to the defined roles
Actual - The users are not able to access to the dashboards when any setting is changed in Intelliboard moodle-settings page

Found in 2020011603 version, replicated in 2019121223 version

Core external lib tests are failing for local_intelliboard services

Hello,

We are getting some errors for core unit tests for local_intelliboard.

$ vendor/bin/phpunit core_externallib_testcase lib/tests/externallib_test.php
Moodle 3.4.3 (Build: 20180517), 3b9df47aac7b609949252cc34960f7e3a3d279fe
Php: 7.1.13.1.16.04.1.1, mysqli: 5.7.20-0ubuntu0.16.04.1, OS: Linux 4.4.0-87-generic x86_64
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.

...............................................................  63 / 686 (  9%)
............................................................... 126 / 686 ( 18%)
............................................................... 189 / 686 ( 27%)
............................................................... 252 / 686 ( 36%)
............................................................... 315 / 686 ( 45%)
......EE....................................................... 378 / 686 ( 55%)
............................................................... 441 / 686 ( 64%)
............................................................... 504 / 686 ( 73%)
............................................................... 567 / 686 ( 82%)
............................................................... 630 / 686 ( 91%)
........................................................        686 / 686 (100%)

Time: 2.28 minutes, Memory: 150.00MB

There were 2 errors:

1) core_externallib_testcase::test_all_external_info with data set "local_intelliboard_extract_db_params_from_sentence" (stdClass Object (...))
Unexpected debugging() call detected.
Debugging: External function parameters: invalid OPTIONAL value specified.
* line 694 of /lib/externallib.php: call to debugging()
* line 120 of /local/intelliboard/classes/searchlib.php: call to external_function_parameters->__construct()
* line 118 of /lib/externallib.php: call to local_intelliboard_search::extract_db_params_from_sentence_parameters()
* line 395 of /lib/tests/externallib_test.php: call to external_api::external_function_info()
* line ? of unknownfile: call to core_externallib_testcase->test_all_external_info()
* line 1071 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
* line 939 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 91 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 698 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 894 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 546 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 195 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
* line 148 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 53 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()


/vagrant/www/moodle/lib/phpunit/classes/advanced_testcase.php:99

To re-run:
 vendor/bin/phpunit core_externallib_testcase lib/tests/externallib_test.php

2) core_externallib_testcase::test_all_external_info with data set "local_intelliboard_get_data_by_query" (stdClass Object (...))
Unexpected debugging() call detected.
Debugging: External function parameters: invalid OPTIONAL value specified.
* line 694 of /lib/externallib.php: call to debugging()
* line 77 of /local/intelliboard/classes/searchlib.php: call to external_function_parameters->__construct()
* line 118 of /lib/externallib.php: call to local_intelliboard_search::get_data_by_query_parameters()
* line 395 of /lib/tests/externallib_test.php: call to external_api::external_function_info()
* line ? of unknownfile: call to core_externallib_testcase->test_all_external_info()
* line 1071 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to ReflectionMethod->invokeArgs()
* line 939 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 91 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 698 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 894 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 755 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 546 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 195 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
* line 148 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 53 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()


/vagrant/www/moodle/lib/phpunit/classes/advanced_testcase.php:99

To re-run:
 vendor/bin/phpunit core_externallib_testcase lib/tests/externallib_test.php

ERRORS!
Tests: 686, Assertions: 4090, Errors: 2.

Seems like you are using external_function_parameters with VALUE_OPTIONAL. In this particular case, maybe using VALUE_DEFAULT would be the fix since there are already almost all default values defined for these "optional" parameters.

Deprecation of $handlers in favor of Events 2 API

Hello,

Just a notification I received the following warning when testing this latest version 2016051100 out on Moodle 3.1 (Build: 20160523). It's just a warning at present, as Moodle is still migrating to the newer Events 2 API:

Events API using $handlers array has been deprecated in favour of Events 2 API, please use it instead.

line 4050 of /lib/deprecatedlib.php: call to debugging()
line 533 of /lib/upgradelib.php: call to events_update_definition()
line 1742 of /lib/upgradelib.php: call to upgrade_plugins()
line 677 of /admin/index.php: call to upgrade_noncore()

Doubts regarding RAW_PARAM and param cleaning on webservice

Hi, first of all, great job on this plugin

I'm upgrading from version 2023062704 to 2023091204 and I found the following issues/concerns:

On externallib.php I found 'exclude_categories' => new external_value(PARAM_RAW, 'Custom var', VALUE_OPTIONAL, '') should not this param be PARAM_TEXT since it's basically a CSV?

Then below we have;

if ($params->exclude_categories) {
        $exclude_categories = is_array($params->exclude_categories) ? implode(',', $params->exclude_categories) : $params->exclude_categories;
        if (!empty($exclude_categories)) {
            $sqlfilter .= " AND c.category NOT IN($exclude_categories)";
        }
}

This is here and here

The parameter is not being cleaned and put in the SQL without proper validation

In the same file is also being used print_error here and here which is deprecated (see MDL-71062) in favor of moodle_exception

If you can please review this I would appreciate your help

Thanks

Three Intelliboard cookies not marked HTTPOnly

Client did a load/security test on psaulearn.globalpsa.com and discovered that the following cookies from the Intelliboard plugin are not marked as Secure:

intelliboardPage
intelliboardParam
intelliboardTime

HTTPOnly cookies cannot be read by client-side scripts, therefore marking a cookie as HTTPOnly can provide an additional layer of protection against cross-site scripting attacks.

The client recommends that the cookies are marked as HTTPOnly.

Provide branches/tags for different Moodle versions

Greetings,

There are three versions of this plugin listed on the Moodle.org plugins page: One that is compatible with Moodle 3.1, another that is compatible with 3.2 and 3.3, and another that is compatible with >=3.4.

It would be very helpful if there were branches or tags for each of these releases. Right now, for example, it's complicated to pull the 3.2-compatible version from the Git repo.

Latest version breaks language editing in Moodle

Hi,

In the plugin language files there are duplicate language strings:
$string['csv'] = 'CSV';
$string['CSV'] = 'CSV';
$string['pdf'] = 'PDF';
$string['PDF'] = 'PDF';

This causes a database error when trying to open e.g. English language pack for editing in the language customization tool:
Error writing to database Debug: Duplicate entry 'en-406-CSV' for key 'mdl_toolcust_lancomstr_uix'\nINSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)\n[array (\n 0 => 'en',\n 1 => '406',\n 2 => 'CSV',\n 3 => 'CSV',\n 4 => 'CSV',\n 5 => 1634554019,\n 6 => 0,\n 7 => NULL,\n 8 => NULL,\n)]

Uppercase string identifiers in language files might cause some problems in general because of a Moodle bug: https://tracker.moodle.org/browse/MDL-67302

Performance issues

Hi,

On a relatively big database the plugin issues SQL queries that run for long time, causing the report pages to crash and sometimes rendering the whole site not responsive

As we have a non-subscribed installation on our test Moodle, we could test only 3 available reports and the 2nd of them, "Activity stats summary" behaves as described: the query takes 22 minutes to complete while the report page breaks down with "unable to obtain session lock" error

Here's the query's result:
+----------+
| COUNT(1) |
+----------+
| 67225 |
+----------+
1 row in set (22 min 30.54 sec)

On production, while investigating the site outage, we identified another query that most probably was the cause of the outage (please see attached) - that means at least 1 more report has performance issues

query.sql.txt

GDPR compliance is missing

Hello,

We've found that GDPR compliance is missing on your plugin.

These tables hold user data:
local_intelliboard_tracking
local_intelliboard_assign

See:
https://docs.moodle.org/dev/Privacy_API#Describing_data_stored_in_database_tables
https://docs.moodle.org/dev/Privacy_API#Providing_a_way_to_export_user_data

And your plugin is also not reporting that it shares data with an external location.
See:
https://docs.moodle.org/dev/Privacy_API#Indicating_that_you_export_data_to_an_external_location

You can use these utility scripts to verify if your plugin is correctly complying with GDPR:
https://docs.moodle.org/dev/Privacy_API/Utilities

Allmost nothing can be translated in Moodle

Hello,

following strings cannot be translated in Moodle from local_intelliboard.php, please make them available to translate.

Dashboard-tab

-Month and weekday names shown in graphical raport on Dashboard see 1.png
-Enrollment method names in the pie chart on Dashboard see 2.png

  • Participation hovers cannot be translated and by that I mean text "Enrolled users: x, Completed: y" see 3.png

Learners-tab

  • Topics "Total learners", "Enrolled learners" and "status" cannot be translated.
  • Under "Total learners" words "Registered" "Not Confirmed" and "Suspended" cannot be translated
  • Under "Enrolled learners" words "manual" "self" and "Cohort" cannot be translated.
  • Under topic "status" words "active", "graduated" and "deleted" cannot be translated

see 4.png for 1-4.

  1. It seems nothing can be translated from Learner-tab.

Including:

  • "unique sessions"
  • "most active users"
  • Learner
  • Courses
  • Visits
  • Time Spent
  • Last access
  • "active users"
  • "new registrants"
  • "Registrants"
  • Month names under these graphs.

Courses-tab

  • Nothing can be translated

Performance-tab

  • Nothing can be translated

Reports

  • Under all reports nothing can be translated

1
2
3
4

Ability to disable SQL reports from Moodle

We'd like the ability to completely disable the SQL report functionality from the Moodle side. Something like a CFG variable that disables the relevant function would be ideal.

Warnings displayed when debug mode is enabled

On Moodle 3.3.5
$plugin->version = 2017112804;
$plugin->release = '4.8.3';

When viewing .../local/intelliboard/courses.php

Notice: Undefined property: stdClass::$filter in /ramdisk/lmsdata/topsolid-staging/moodle-live/local/intelliboard/externallib.php on line 8102

Notice: Undefined variable: sql_order in /ramdisk/lmsdata/topsolid-staging/moodle-live/local/intelliboard/externallib.php on line 8116

When viewing .../local/intelliboard/reports.php?id=1

Notice: Undefined property: stdClass::$debug in /ramdisk/lmsdata/topsolid-staging/moodle-live/local/intelliboard/externallib.php on line 317

Navigation links in Site Administration will no longer be available on Totara 12

In testing the current local_intelliboard plugin version on our Totara 12 instance I'm seeing that although the individual Intelliboard pages are still accessible via search within the Quickaccess dropdown, The Intelliboard menu itself is no longer visible because the Site Administration menu was completely removed and replaced with that Quickaccess dropdown menu in Totara 12 per TL-17941. Just wanted to forward on this information about changed navigation in upcoming Totara 12 to make sure you're aware this will affect the user's access to these menu links.

Moodle 3.5/3.6 privacy compliance

Hello,

There are new privacy APIs in latest versions of Moodle 3.5 and 3.6 that need to be implemented. It would be nice to have these features included.

Taken from the Privacy API page

In addition to existing requirements for GDPR compatible plugins, any plugin which implements the plugin provider interface must also implement the \core_privacy\local\request\core_userlist_provider interface. Two new methods need to be implemented:

However, the two above methods are not required for plugins that implement the null_provider only (i.e. which do not store personal data).

Unit test error :: String does not exist cachedef_reports_list/local_intelliboard

A core unit test is having issues in Moodle

There was 1 error:

1) core_cache_administration_helper_testcase::test_get_summaries
Unexpected debugging() call detected.
Debugging: String does not exist. Please check your string definition for cachedef_reports_list/local_intelliboard
* line 10272 of /lib/moodlelib.php: call to debugging()
* line 623 of /cache/classes/definition.php: call to lang_string->__construct()
* line 807 of /cache/locallib.php: call to cache_definition->get_name()
* line 97 of /cache/tests/administration_helper_test.php: call to cache_administration_helper::get_definition_summaries()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to core_cache_administration_helper_testcase->test_get_summaries()
* line 842 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
* line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
* line 693 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 796 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 652 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 206 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
* line 162 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 61 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()


/siteroot/lib/phpunit/classes/advanced_testcase.php:88

To re-run:
 vendor/bin/phpunit "core_cache_administration_helper_testcase" cache/tests/administration_helper_test.php

Errors when running cron

Hi, When we run cron job, we have this error with this plugin :

PHP Warning:  Cannot modify header information - headers already sent by (output started at lib/weblib.php:3179) in local/intelliboard/lib.php on line 166 PHP Warning:  Cannot modify header information - headers already sent by (output started at lib/weblib.php:3179) in local/intelliboard/lib.php on line 167 PHP Warning:  Cannot modify header information - headers already sent by (output started at lib/weblib.php:3179) in local/intelliboard/lib.php on line 168

We use the 2.7.3 version of Moodle. Thanks!

Performance improvements for tracking_file_storage->exportData()

This method is extremely inefficient:

https://github.com/intelliboard/intelliboard/blob/master/classes/repositories/tracking_file_storage.php#L178-L232

It does a huge amount of individual reads and writes to the db which create bottlenecks with io and latency.

What I would propose is:

  1. build up a list of records that need to be checked into batches
  2. grab the status of each batch of records in one sql call
  3. do a batch update of the records that exist in a single call
  4. batch insert the remaining records using $DB->insert_records()
  5. I would also make the transactions as small as possible so it doesn't lock these tables / rows

I would expect these changes to get roughly an order of magnitude better performance out of this cron task

Exception - Argument 1 passed to check_user_preferences_loaded() must be an instance of stdClass, null given, called in [dirroot]/lib/moodlelib.php on line 2158

I get this error when installing local_intelliboard7.0.0.0 on Moodle 4.0.5-4.1.0.
Details on the error are below.

Exception - Argument 1 passed to check_user_preferences_loaded() must be an instance of stdClass, null given, called in
[dirroot]/lib/moodlelib.php on line 2158
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 1897 of /lib/moodlelib.php: TypeError thrown
line 2158 of /lib/moodlelib.php: call to check_user_preferences_loaded()
line 307 of /local/intelliboard/lib.php: call to get_user_preferences()
line 600 of /local/intelliboard/lib.php: call to local_intelliboard_insert_tracking()
line 603 of /local/intelliboard/lib.php: call to local_intelliboard_init()
line 866 of /lib/classes/component.php: call to include_once()
line 7918 of /lib/moodlelib.php: call to core_component::get_plugin_list_with_file()
line 831 of /lib/setup.php: call to get_plugins_with_function()
line 912 of /config.php: call to require_once()
line 94 of /admin/index.php: call to require()

changes for unique class to resolve conflict with other plugins

Intelliboard plugin has a page setup.php, over there it's using a class called slider.
This class is conflicting with another community plugin block_slider. The conflict is happening from the CSS used for the intelliboard plugin. It's breaking the dashboard with blocks whoever using that block_slider plugin or any other plugin has got any class named as slider. I believe it is always recommended to use class name specific to the plugin.
I made the fix and pushed and made a pull request #38
The changes I made:

  1. Made the change in the setup.mustache from slider to intelliboard-slider.
  2. Made changes to the style.css from slider to intelliboard-slider.
    Hope it helps.

Issues in data schema checks

When checking the database schema, I'm getting the following for the new table included in version 5:

$ php admin/cli/check_database_schema.php
...
local_intelliboard_assign
 * column 'userid' should allow NULL (I)
 * column 'userid' has default '0', expected 'NULL' (I)
 * column 'instance' should allow NULL (I)
 * column 'instance' has default '0', expected 'NULL' (I)
 * column 'timecreated' should allow NULL (I)
 * column 'timecreated' has default '0', expected 'NULL' (I)

Schema alignment error

I found our site has an error for schema alignment.

$ php admin/cli/check_database_schema.php

local_intelliboard_bbb_atten

  • column 'userid' has incorrect type 'I', expected 'C'

local_intelliboard_trns_c

  • column 'useremail' has default 'NULL', expected 'NULL' (C)
  • column 'firstname' has default 'NULL', expected 'NULL' (C)
  • column 'lastname' has default 'NULL', expected 'NULL' (C)
  • column 'enroltype' has default 'NULL', expected 'NULL' (C)
  • column 'coursename' has default 'NULL', expected 'NULL' (C)
  • column 'finalgrade' has default '0.00000', expected 'NULL' (N)
  • column 'formattedgrade' has default 'NULL', expected 'NULL' (C)
  • column 'rolesids' has default 'NULL', expected 'NULL' (C)
  • column 'groupsids' has default 'NULL', expected 'NULL' (C)

local_intelliboard_trns_m

  • column 'modulename' has default 'NULL', expected 'NULL' (C)
  • column 'moduletype' has default 'NULL', expected 'NULL' (C)
  • column 'formattedgrade' has default 'NULL', expected 'NULL' (C)

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.