Code Monkey home page Code Monkey logo

moodle-local_learning_analytics's People

Contributors

christina-roperto avatar eldorandev avatar rahelphsn avatar thomasdondorf avatar thorbenlaprell avatar

Stargazers

 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

moodle-local_learning_analytics's Issues

failed on cache_testcase::test_get_enabled_tourdata_disabled

There was 1 failure:

1) cache_testcase::test_get_enabled_tourdata_disabled
Failed asserting that an array is empty.

/var/www/site/admin/tool/usertours/tests/cache_test.php:51
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
phpvfscomposer:///var/www/site/vendor/phpunit/phpunit/phpunit:60

To re-run:
 vendor/bin/phpunit "cache_testcase" admin/tool/usertours/tests/cache_test.php

FAILURES!
Tests: 5924, Assertions: 39533, Failures: 1, Skipped: 55.
Unexpected DB writes in phpunit_util::reset_all_data()

I'll create a PR shortly.

❓ Extending Analytics Framework to include Student Centric Data

Hi Thomas,

Danke Shoen for your super awesome plugin.
I sent a message in moodle before asking about how to extend the plugin in order to support Student centric data analysis. The solution you suggested is to pull in external data and generate reports with that extra data. That solution definitely works, however, what I was thinking of is to extend your data logging plugin to capture Student data in addition to teacher's data. This way the heart of our analytics engine is using your plugin and architecture. Additionally, since everything is in one system, it's easier to understand and maintain. If we were to take the approach of building on your architecture and extending its functionality to provide both Teacher and Student centric analytics, can you help to point us in the right direction. Many Thanks

Fehlermeldung report quiz assign

Hallo Herr Dondorf,
wir testen Ihr Plugin an der Hochschule Bochum. Im Dashboard führt der Aufruf Test & Aufgaben in einem Kurs zu folgender Fehlermeldung:

Fehler: Argument 1 passed to local_learning_analytics\local\outputs\table::fancynumbercellcolored() must be of the type float, null given, called in [dirroot]/local/learning_analytics/reports/quiz_assign/lareport_quiz_assign.php on line 81

Gruß
..Roland

Missing lang string "learning_analytics:view_statistics"

Shown on our test system...

Invalid get_string() identifier: 'learning_analytics:view_statistics' or component 'local_learning_analytics'. Perhaps you are missing $string['learning_analytics:view_statistics'] = ''; in /moodle/application/htdocs/moodle/eval/local/learning_analytics/lang/en/local_learning_analytics.php?
line 353 of /lib/classes/string_manager_standard.php: call to debugging()
line 7405 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 2589 of /lib/accesslib.php: call to get_string()
line 78 of /admin/tool/editrolesbycap/capabilityformfield.php: call to get_capability_string()
line 42 of /admin/tool/editrolesbycap/capabilityformfield.php: call to MoodleQuickForm_capability->get_capabitity_optgroups()
line 577 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm_capability->__construct()
line 613 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm->_loadElement()
line 49 of /admin/tool/editrolesbycap/locallib.php: call to HTML_QuickForm->addElement()
line 214 of /lib/formslib.php: call to tool_editrolesbycap_capability_form->definition()
line 57 of /admin/tool/editrolesbycap/index.php: call to moodleform->__construct()

A message from Xi'an Jiaotong Liverpool University in China

Hi,
Thanks for sharing this great data analytics plugin and we found it very useful! We want to get in touch with you, but can't find your contact information on the web pages, so the purpose of leaving a message here is merely to catch your attention and hear from you earlier.
Please let me introduce my school, my department a little bit first. I'm from Xi'an Jiaotong Liverpool University of China. Here is our official web site if you're interested: https://www.xjtlu.edu.cn/en/ . My department's name is Center for Education and Technology. The Moodle-based teaching and learning platform in our campus is introduced, deployed and maintained by our team. We also keep an eye on all new features, plugins released in Moodle community and get the useful ones deployed ASAP in our platform to keep enhancing the functionality of it. We have been working with some software providers related with Moodle around the world and we have very good relationships. Last week my manager found your "Learning Analytics" plugin and he was so excited to see the features it implements are what we desire for so long. He immediately downloaded it and installed it in the test environment and it worked very well. I was told about it the next morning and I tried its features on my local machine and added some codes in this plugin to create a new “attendance” report and it is displayed nicely on the dashboard. (I’m a new PHP programmer by the way.)We plan to install this plugin in our production environment in the beginning of the coming semester in this September and in the near future part of my work will be focusing on this plugin and develop more reports with it to suit the needs of the teachers and students. I also want to share my codes because I think what’s useful to us probably is useful to some other people as well.
We really want to get in touch with you and maybe talk with you some time on the computers if you’re willing to. Hope you can share with us some necessary knowledge about how to create good reports with this plugin. Many thanks in advance.

Questions on features

Hi,
thank you for this very promising plugin for Moodle. We love your approach on using logdata and are considering to switch from our current tool to yours. What we still wondering about is ...

  • Is there a way to filter usage statictsics for a specific activity/resource for a specific time frame (e.g. March 17th to April 10th file XYZ)?
  • Is it possible to write a Moodle message (anonymously) to those students who were active or inactive at a specific activity/resource?
  • Is it possible to see usage statistics not only for view action but also update/submit etc.?
  • Do you support / will consider group specific usage staticstics?

Thank you for your help in advance and keep up the great work!

Best regards / herzliche Grüße,
Gergely Rakoczi (TU Wien)

Support for Microsoft SQL Server

Unfortunately, the course statistics do not seem to work at all but lead to an SQL Server error. Anyhow, we would like to give it a try.

Maybe the most important fact is that our Moodle platform runs with Microsoft SQL Server as database.

System

  • Moodle 3.9.4+ (Build: 20210226)
  • DB: Microsoft SQL Server
  • Plug-ins:
    • Learning Analytics Log v0.8.0 (Build: 2020102200)
    • Learning Analytics v0.16.0 (Build: 2021021500)

Steps to reproduce

Screenshot

image

Full error message

Debug info: SQLState: 42S22<br>
Error Code: 207<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'week'.<br>

SELECT (FLOOR((l.timecreated - 1604271600) / (7 * 60 * 60 * 24)) + 1)
AS WEEK,
COUNT(*) clicks
FROM mdl_logstore_lanalytics_log l
WHERE l.courseid = '26'
GROUP BY week
ORDER BY week;
[array (
0 => 26,
)]
Error code: dmlreadexception
Stack trace:

    line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
    line 324 of /lib/dml/sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
    line 431 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
    line 900 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
    line 976 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
    line 63 of /local/learning_analytics/reports/coursedashboard/classes/query_helper.php: call to sqlsrv_native_moodle_database->get_records_sql()
    line 50 of /local/learning_analytics/reports/coursedashboard/lareport_coursedashboard.php: call to lareport_coursedashboard\query_helper::query_weekly_activity()
    line 460 of /local/learning_analytics/reports/coursedashboard/lareport_coursedashboard.php: call to lareport_coursedashboard->activiyoverweeks()
    line 46 of /local/learning_analytics/classes/router.php: call to lareport_coursedashboard->run()
    line 103 of /local/learning_analytics/classes/router.php: call to local_learning_analytics\router::run_report_or_page()
    line 118 of /local/learning_analytics/index.php: call to local_learning_analytics\router::run()

Feature request

Hi,
first of all thank you very much for this really helpful tool. However, I we are missing some features:

  • A possibility to sort the output by moodle groups
  • A possibility to reset the logstore when the course is reused.

Did you have already thought about adding some kind of features?
TIA!
Best,
Alex

2 little mariadb-pgsql issues

The quiz_assign query_helper uses in the query_quiz function the COALESCE function to handle divisions with 0.
This works fine in mariadb, but the database query throws an error in pgsql when the division with0 takes place.

During my work on the phpunit tests i encountered a problem with different handling of the daytimesavingoffset in pgsql and mariadb. By deafault pgsql interprets the offset right and mariadb works with it like UTC+0.

Postgresql compatibility

Hi,
thanks for this great tool.
Currently heat map is using FROM_UNIXTIME function that exist only on mysql or mariadb.

Request to /local/learning_analytics/index.php/reports/weekheatmap
gives following error:

Debug info: ERROR: function from_unixtime(bigint, unknown) does not exist
LINE 2: FROM_UNIXTIME(l.timecreated, '%w-%k') AS heatpoi...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
SELECT
FROM_UNIXTIME(l.timecreated, '%w-%k') AS heatpoint,
COUNT(1) AS value
FROM mdl_logstore_lanalytics_log AS l
WHERE l.courseid = $1
GROUP BY heatpoint
ORDER BY heatpoint
[array (
0 => 3488,
)]
Error code: dmlreadexception

BibTex: doesn't it ignore capitalization?

Dear @thomasdondorf if taken as-is like you present my BibTex parser (BibTeX Biber 2.19) does write the words not in {} brackets in lower case.
So, I think, the correct BibTex should be:

@phdthesis{Dondorf:844544,
    author       = {Dondorf, Thomas}, 
    othercontributors = {Nacken, Heribert and Persike, Malte},
    title        = {{L}earning {Analytics} for {Moodle}: {Facilitating} the {Adoption} of {Data} {Privacy} {Friendly} {Learning}     school       = {Rheinisch-Westfälische Technische Hochschule Aachen},
    type         = {Dissertation},
    address      = {Aachen},
    publisher    = {RWTH Aachen University},
    reportid     = {RWTH-2022-04002},
    year         = {2022},
    doi          = {10.18154/RWTH-2022-04002},
    url          = {https://publications.rwth-aachen.de/record/844544},
}

if you want to aim at the result you're presenting as blueprint.

Just a guess.

Best,
Luca

Debugging: parent does not exist!

There was 1 error:

1) core_admintree_testcase::test_admin_setting_configexecutable
Unexpected debugging() call detected.
Debugging: parent does not exist!
* line 920 of /lib/adminlib.php: call to debugging()
* line 31 of /local/learning_analytics/settings.php: call to admin_category->add()
* line 67 of /lib/classes/plugininfo/local.php: call to include()
* line 728 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()
* line 8672 of /lib/adminlib.php: call to require()
* line 1980 of /lib/adminlib.php: call to admin_get_root()
* line 2854 of /lib/adminlib.php: call to admin_setting->get_defaultsetting()
* line 162 of /lib/tests/admintree_test.php: call to admin_setting_configexecutable->output_html()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to core_admintree_testcase->test_admin_setting_configexecutable()
* 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 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->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 60 of phpvfscomposer:///vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 115 of /vendor/bin/phpunit: call to include()
Debugging: parent does not exist!
* line 920 of /lib/adminlib.php: call to debugging()
* line 126 of /local/learning_analytics/settings.php: call to admin_category->add()
* line 67 of /lib/classes/plugininfo/local.php: call to include()
* line 728 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()
* line 8672 of /lib/adminlib.php: call to require()
* line 1980 of /lib/adminlib.php: call to admin_get_root()
* line 2854 of /lib/adminlib.php: call to admin_setting->get_defaultsetting()
* line 162 of /lib/tests/admintree_test.php: call to admin_setting_configexecutable->output_html()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to core_admintree_testcase->test_admin_setting_configexecutable()
* 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 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->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 60 of phpvfscomposer:///vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 115 of /vendor/bin/phpunit: call to include()
Debugging: parent does not exist!
* line 920 of /lib/adminlib.php: call to debugging()
* line 31 of /local/learning_analytics/settings.php: call to admin_category->add()
* line 67 of /lib/classes/plugininfo/local.php: call to include()
* line 728 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()
* line 8672 of /lib/adminlib.php: call to require()
* line 9033 of /lib/adminlib.php: call to admin_get_root()
* line 2874 of /lib/adminlib.php: call to format_admin_setting()
* line 162 of /lib/tests/admintree_test.php: call to admin_setting_configexecutable->output_html()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to core_admintree_testcase->test_admin_setting_configexecutable()
* 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 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->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 60 of phpvfscomposer:///vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 115 of /vendor/bin/phpunit: call to include()
Debugging: parent does not exist!
* line 920 of /lib/adminlib.php: call to debugging()
* line 126 of /local/learning_analytics/settings.php: call to admin_category->add()
* line 67 of /lib/classes/plugininfo/local.php: call to include()
* line 728 of /admin/settings/plugins.php: call to core\plugininfo\local->load_settings()
* line 8672 of /lib/adminlib.php: call to require()
* line 9033 of /lib/adminlib.php: call to admin_get_root()
* line 2874 of /lib/adminlib.php: call to format_admin_setting()
* line 162 of /lib/tests/admintree_test.php: call to admin_setting_configexecutable->output_html()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to core_admintree_testcase->test_admin_setting_configexecutable()
* 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 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->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 60 of phpvfscomposer:///vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 115 of /vendor/bin/phpunit: call to include()

I will create a PR shortly,

Hardcoded Language Strings

Hello,

Thank you for your great plugin.
However, the String is a string in user profile setting, which might be hardcoded. The string "Learning Analytics" is always in english, even if we change the language. It would be nice if the string changeable into another language.

image

Capabilities cannot be set?

I have installed both the Learning Analytics Log, and the Learning Analytics for Moodle plugins. However, when I try to navigate to https://MOODLE_INSTALLATION/local/learning_analytics/index.php/reports/coursedashboard?course=COURSE_ID I get the permission denied error.

image

I do have the log plugin activated, and I am both the Site Admin and the Teacher for this course.

I did look into adding the view permission the teacher role, but could not find the local/learning_analytics:view_statistics capability. I also did not change any of the default settings of the log plugin (Beyond activating it).

This is Moodle 4.3.2, running on php version 8.0.30.

Is this a known bug, or (hopefully) a frequently encounter user error?

Better alternative to hard-coded English-German titles of custom fields

This is not great:

// Unfortunately, the customfields do not support language strings (as they are inserted into the database)
// So, instead we have to use strings that are english/german
const CUSTOMFIELD_CATEGORY_NAME = 'Learning Analytics';
const CUSTOMFIELD_CATEGORY_DESCRIPTION = 'This category was automatically created by the Learning Analytics plugin (local_learning_analytics). You should not manually delete this.';
// We use multilang strings here with an "invalid" divider in between. That way, if multilang strings are enabled, the corresponding language is used, otherwise
// both languages (including the divider) will be shown.
const CUSTOMFIELD_FIELD_NAME = '<span lang="en" class="multilang">Enable Usage Statistics</span><span lang="invalid" class="multilang"> / </span><span lang="de" class="multilang">Zugriffsstatistiken aktivieren</span>';
const CUSTOMFIELD_FIELD_DESCRIPTION = '<span lang="en" class="multilang">Enabling adds the link "Usage Statistics" to your course navigation.</span><span lang="invalid" class="multilang"> / ' .
"\r\n" . '</span><span lang="de" class="multilang">Die Aktivierung fügt der Kursnavigation den Link "Zugriffsstatistiken" hinzu.</span>';

I understand the limitations of customfields. Yet, it is quite common practice that the fields are still created using the names takes out from the language pack. That way the strings can be translated in AMOS (e.g. into Czech) and then is a Czech installs the plugin, the custom fields are created using the Czech titles (or falling back to English ones if they are not translated yet).

This is not great for multi-language sites but I believe it is still lesser evil (and more common) than these hard-coded English-German titles.

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.