Moodle in English

Discussions started in Moodle in English

Moodle in English -> General help External database enrolment for version 3.6

by Jerry Lau -

Hello folks

We are running version 3.6.x on a RHEL 7.6 64-BIT, PHP 7.7.2 and MySQL 5.7

Our external database enrolment was working great in previous versions 3.4.x but now we noticed that the enrolments are missing enrolments.

I read this and there is a subtle difference now I think

https://docs.moodle.org/37/en/External_database_enrolment#Synchronising_external_database_enrolments_.28scheduled_task_and_deprecated_script.29

Do users have to EXIST or created in moodle for this to work? In previous moodle versions, if a user does not exist but has a record in the external enrolment database and sychronized, Moodle would automatically create that account regardless if they exist in Moodle or not in the user table.

So do they have to exist before the synchronization script is called?

I am using the "/path/to/moodle/enrol/database/cli/sync.php"  just past midnight once a day.

What am I doing wrong and what areas should I check (and how to check) that my settings are okay?

Thanks

Jerry




Average of ratings: -

Moodle in English -> General help Cannot add new user via interface ( COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'utf8')

by Jerry Lau -

Running moodle 3.6.5+ on RHEL 7.6 64-BIT with php 7.1.8 & Mysql 5.7.25

So was trying to manually add a new user and then I got this (turned on debugging)

Error reading from database

More information about this error

×

Debug info: COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'utf8'

SELECT 'x' FROM mdl_user WHERE LOWER(email) COLLATE utf8mb4_bin = LOWER(?) AND mnethostid = ? AND id <> ? LIMIT 0, 1

[array (

0 => 'john.test@student.school.com',

1 => '4',

2 => -1,

)]

Error code: dmlreadexception

×

Stack trace:

line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown

line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()

line 1902 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()

line 1887 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_sql()

line 311 of /user/editadvanced_form.php: call to moodle_database->record_exists_select()

line 590 of /lib/formslib.php: call to user_editadvanced_form->validation()

line 526 of /lib/formslib.php: call to moodleform->validate_defined_fields()

line 636 of /lib/formslib.php: call to moodleform->is_validated()

line 171 of /user/editadvanced.php: call to moodleform->get_data()


Where and how do I start to fix this?


Average of ratings: -

Moodle in English -> General help Is there Plugin for "Time Tracking" when they do their work in classroom?

by Jerry Lau -

Hello everyone.

Running Moodle 3.6.5 (latest) on RHEL 7.5 64-BIT, mYSql 5.7.25 & php 7.1.8

Our department needs students to track the hours they are required to spend in the computer labs outside of class time. They need a time tracking app with the following functionalities (these are based on the softwarethey are already using – Time Clock Wizard):

  1. Students track their lab hours by clocking in and out in the software
  2. Students can request changes to their time entries before or after the fact if they’ve made an error
  3. Department needs to be able to approve these requests
  4. Students must not be able to log in or out from IP addresses outside of the school
  5. Students and department can view reports on logged time
  6. Department can view who is currently logged in
  7. Software must notify department of possible log in/out errors (ex, time entries that are too long)
  8. Software automatically logs out a student if they’ve been logged in for 24 hours
  9. Students can access it from any device or computer on campus, including their personal devices
Does moodle have a similar plugin?
Average of ratings: -

Moodle in English -> General help How can we run via CLI the purge cache feature?

by Jerry Lau -

having problems trying to reinstall a plugin after an upgrade to our moodle to 3.6.5. and holding our upgrade up

Tool_ally is refusing to install and holding things up. I read that one possible solution is to purge all cache, but I am unable to get to that screen from the loop I’m caught up in. I usually get back to the installation screen with this URL, but that doesn’t help me in this particular case, since I need to try purging all cache.

How can we run via CLI the purge cache feature?

thanks

Average of ratings: -

Moodle in English -> General help Fatal error - auth_db\task\sync_users - Exception - Call to undefined method cachestore_dummy::find_by_prefix() !!!

by Jerry Lau -

So we upgraded our production moodle last night from 3.4.9 to 3.6.5 (latest one) and saw this in my cron log
RHEL 7.5 64-bit, MySQL 5.7 and php 7.1.8
Never saw this error before ...
Server Time: Wed, 24 Jul 2019 00:33:01 -0700Execute scheduled task: Synchronise users task (auth_db\task\sync_users)
... started 00:33:01. Current memory use 14MB.
User entries to add: 16
Default exception handler: Exception - Call to undefined method cachestore_dummy::find_by_prefix() Debug:
Error code: generalexceptionmessage
* line 1796 of /cache/classes/loaders.php: Error thrown
* line 131 of /user/lib.php: call to cache_session->purge_current_user()
* line 465 of /auth/db/auth.php: call to user_create_user()
* line 60 of /auth/db/classes/task/sync_users.php: call to auth_plugin_db->sync_users()
* line 105 of /lib/cronlib.php: call to auth_db\task\sync_users->execute()
* line 67 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 61 of /admin/cli/cron.php: call to cron_run() !!! Exception - Call to undefined method cachestore_dummy::find_by_prefix() !!!
PHP Fatal error: Uncaught coding_exception: Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
/our/moodle/site/lib/classes/task/manager.php on line 520 Code should look like: $factory = \core\lock\lock_config::get_lock_factory('type');
$lock = $factory->get_lock(Resource id #1021);
$lock->release(); // Locks must ALWAYS be released like this. in /our/moodle/site/lib/classes/lock/lock.php:117
Stack trace:
#0 [internal function]: core\lock\lock->__destruct()
#1 {main}
thrown in /our/moodle/site/lib/classes/lock/lock.php on line 117
thoughts?






Average of ratings: Useful (1)