Coder Social home page Coder Social logo

hipjea / moodle-block_studentstracker Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 5.0 637 KB

Moodle plugin tracking users that didn't access a course for some days. It aims to provide a tool to help the teachers preventing students from dropping out.

Home Page: https://moodle.org/plugins/block_studentstracker

License: GNU General Public License v3.0

PHP 71.22% JavaScript 12.70% Mustache 10.78% Less 5.30%
elearning moodle moodle-block students teachers

moodle-block_studentstracker's Introduction

Ruby on Rails
React
Moodle
Javascript
Python
WordPress

moodle-block_studentstracker's People

Contributors

hipjea avatar lucaboesch avatar tristanmurdoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

moodle-block_studentstracker's Issues

[New] - ERROR: Incorrect number of query parameters. Expected 3, got 2

Hi @Hipjea ,

This is a continuation from Issue 9.

I'm using version 1.7 and I have got a strange error below for the specific course only. The rest of the courses were fine.

Warning: Invalid argument supplied for foreach() in /documentroot/blocks/studentstracker/locallib.php on line 237

Warning: count(): Parameter must be an array or an object that implements Countable in /documentroot/blocks/studentstracker/locallib.php on line 241

Error
ERROR: Incorrect number of query parameters. Expected 3, got 2.
Debug info:
Error code: invalidqueryparam
Stack trace:
line 945 of /lib/dml/moodle_database.php: dml_exception thrown
line 1268 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
line 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1744 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1954 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
line 243 of /blocks/studentstracker/locallib.php: call to moodle_database->count_records_sql()
line 168 of /blocks/studentstracker/locallib.php: call to studentstracker::has_role()
line 120 of /blocks/studentstracker/block_studentstracker.php: call to studentstracker->get_enrolled_users()
line 341 of /blocks/moodleblock.class.php: call to block_studentstracker->get_content()
line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1239 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 3950 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 40 of /theme/boost/layout/columns2.php: call to core_renderer->blocks()
line 1374 of /lib/outputrenderers.php: call to include()
line 1304 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 253 of /course/view.php: call to core_renderer->header()

So I tried to print the value of variable $roles at line 241 at file locallib.php by adding the code below, it returns with roles = ?.

        $roles = join(',', array_fill(0, count($roleids), '?'));
        print_object("roles = " . print_r($roles, true));
        $r = $DB->count_records_sql("SELECT COUNT(id) FROM {role_assignments} WHERE roleid IN($roles) AND contextid=? AND userid=?",
        $params);

Any advise is deeply appreciated.

Thanks!

No need to include foreign language strings inside the ZIP file

Hi Pierre,

I downloaded your studentstracker plugin for Moodle and found three language packs besides the English.

Nowadays it is not necessary to enclose language strings other than English in your Moodle plugins. AMOS (https://lang.moodle.org ) now handles all the translations.

Please see https://docs.moodle.org/dev/Plugin_contribution_checklist#Strings

Please see https://lang.moodle.org/mod/forum/discuss.php?d=2485

I have submitted the French, Portuguese and Brazilian Portuguese language strings to the AMOS maintainers for those language packs. They usually are very quick to review and incorporate these strings into their respective language packs. I will try to write you as soon as I know for certain that these strings have been incorporated into these language packs, so that you can safely remove them from the downloadable ZIP file.

I have also completed the Mexican Spanish language translation in AMOS and posted another GitHub issue about what I think are two tiny typos in the English language strings.

Thanks for a nice Moodle plugin.

Version 1.7.0 (2021022601) layout problems

Thanks for your block, really nice. We have been using it for quite some while.

However, the latest update really messes with the block layout. On a full HD screen it still shows like this:
image

Any idea in how to fix this?

ERROR: Incorrect number of query parameters. Expected 3, got 2.

Hi,

After upgrading my Moodle from version 3.0+ to 3.3.5 and block_studentstracker from 2015051100 to 1.5 (2017062200), when viewing one of my courses is showing error message below. I will appreciate if you can help and advise? Thanks

Warning: Invalid argument supplied for foreach() in /path/to/moodle/blocks/studentstracker/locallib.php on line 36
ERROR: Incorrect number of query parameters. Expected 3, got 2.
Debug info:
Error code: invalidqueryparam
Stack trace:
line 913 of /lib/dml/moodle_database.php: dml_exception thrown
line 1211 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
line 1558 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1631 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1841 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
line 42 of /blocks/studentstracker/locallib.php: call to moodle_database->count_records_sql()
line 117 of /blocks/studentstracker/block_studentstracker.php: call to studentstracker::has_role()
line 288 of /blocks/moodleblock.class.php: call to block_studentstracker->get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1205 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1257 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 579 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
line 39 of /theme/bootstrapbase/renderers/core_renderer.php: call to core_renderer->standard_head_html()
line 46 of /theme/lambda/layout/columns3.php: call to theme_bootstrapbase_core_renderer->standard_head_html()
line 1162 of /lib/outputrenderers.php: call to include()
line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 244 of /course/view.php: call to core_renderer->header()

Minor typos in English language strings

Hi,
When I was translating into Mexican Spanish your studentstracker plugin in AMOS, I found a couple of odd-looking English language strings:

roles | block_studentstracker 'Roles allowed to see toe block'
I think that it should be 'Roles allowed to see the block'

I am not sure if text_footer | block_studentstracker 'Contact incitation message' should really be 'invitation' instead of 'incitation'.

Thanks in advance for your help.

Groups to track not working

Hi!

Only "None (All)" works.

Moodle 3.10.8 (Build: 20211108)
studentstracker 1.6.2 and 1.7.1.

1.6.1 - works fine.

Proposed modifications from a teacher

I installed the Student Tracker and got this feedback from one of my instructors:

This is helpful. Is it possible to make two changes, first the dates, can they be put in MM/DD/YYYY (U.S.) format? Second, is it possible to sort the order by most recent date accessed rather than in alphabetical order by last name? Oh, it would be good if the student's email could be included. That way I could just copy the email address or maybe click to email them right from the Student Tracker tool!

If these changes can be made, I'd like to see this feature added to all my courses.

Continuing thinking, those who have not accessed the course for say 50 days could be put in a separate group at the bottom as they are likely really gone.

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.