Moodle in English

Discussions started in Moodle in English

Moodle in English -> Enrolment External database enrolment - query to check

by Jerry Lau -

Hello folks.

running redhat 6.8, mysql 5.7.31 , php 7.2.34.x and moodle 3.9.4+

we are cleaning up our external database enrolments and noticed this in our plugin setting

External database1133 / 7652

what do each of these figures mean?

Our external db enrolment table is emptied out nightly and renamed as "manual" and that might have posed a problem in cleaning up?

What is the query to find these 7652 records?

Thanks



Average of ratings: -

Moodle in English -> General help Is this possible? execute the cron.php from remote server on local server?

by Jerry Lau -

Hello everyone.

My webhost does not allow crons to be executed for their shared hosting plan.

Too late as I've signed on with them LOL

is it possible to have our own PHP/Linux server (on premise) and then on our server, we call our moodle webhost's cron.php file?

for example our server is called "localserver" and our webhost's name is "birdcage"

on localserver, we say


**** /our/php/path/php  birdcage.site.com/admin/cli/cron.php

does that work or do we have to use curl or wget from what my limited understanding is?

Examples would be appreciated and what setup do we need to do to enable this to work at our local and webhost servers?

Thanks!





Average of ratings: -

Moodle in English -> General help Invalid course module ID - when adding an activity

by Jerry Lau -

Hello there.

We are running moodle 3.6.3 with php 7.0.33 and mysql 5.7.

when we try to add an activity to a course, we get the following error. 

However, if I were to back up the same course and restore it as a new course, the problem disappears! 

Can anyone explain why this  course has a problem and how to solve this?

Notice: Undefined offset: 273 in /our/moodle/path/lib/grade/grade_item.php on line 2498
Notice: Trying to get property of non-object in /our/moodle/path/lib/grade/grade_item.php on line 2499
Invalid course module ID
More information about this error
Debug info: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: invalidcoursemodule
×Stack trace:
line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 7052 of /lib/accesslib.php: call to moodle_database->get_record()
line 2499 of /lib/grade/grade_item.php: call to context_module::instance()
line 428 of /lib/grade/grade_item.php: call to grade_item->get_context()
line 403 of /lib/grade/grade_item.php: call to grade_item->delete_all_grades()
line 310 of /lib/grade/grade_category.php: call to grade_item->delete()
line 1447 of /lib/gradelib.php: call to grade_category->delete()
line 5043 of /lib/moodlelib.php: call to remove_course_grades()
line 4960 of /lib/moodlelib.php: call to remove_course_contents()
line 67 of /course/delete.php: call to delete_course()

Thank you!



Average of ratings: -

Moodle in English -> General help error after updating sharing cart version 2020090100

by Jerry Lau -

So on our test instance, we are running php 7.0.x with mysql 5.7.x and moodle version 3.6.3 on a shared hosting provider

I upgraded the sharing cart (2020090100) as moodle plugin suggested smile to version and now all the 150 courses that have that cart cannot be accessed and all I get is the error message

Exception - syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE)
Debug info:
Error code: generalexceptionmessage
Stack trace:
  • line 42 of /blocks/sharing_cart/classes/controller.php: ParseError thrown
  • line ? of unknownfile: call to core_component::classloader()
  • line 87 of /blocks/sharing_cart/block_sharing_cart.php: call to spl_autoload_call()
  • line 321 of /blocks/moodleblock.class.php: call to block_sharing_cart->get_content()
  • line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1216 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1268 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 604 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 44 of /theme/clean/layout/columns3.php: call to theme_bootstrapbase_core_renderer->standard_head_html()
  • line 1328 of /lib/outputrenderers.php: call to include()
  • line 1258 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 244 of /course/view.php: call to core_renderer->header()
The funny thing is that I made a back up of a course and created  new course that had a sharing cart plugin BEFORE upgrading the Sharing Cart plugin and I can view that newly created course, which had the older sharing cart version.

How and where can I troubleshoot this?

Thanks!



Average of ratings: -

Moodle in English -> General help where do we submit enhancements for moodle team to consider

by Jerry Lau -

Hello folks.

Where can I submit enhancement of core code to moodle?

I want to include the course id during a database enrolment output so it makes it easier to get to the course with the id shown other than just the user id and course's shortname.

I tested it on my local environment and its an easy modification.

I tried to asked in general developer forum but no success or reply ...

thanks

Dave



Average of ratings: -