-
I think the problem could be with function in external services, the “enrol_manual_unenrol_users” function doesn’t exist in my installed version of Moodle. It exists from version 3.0. https://docs.moodle.org/dev/Web_service_API_functions#Core_web_service_functions
With regards to Moodle, the only thing that could be an issue is the condition check. Open the moodle.class.php file.
Change this:
_h(get_option('moodle_unenroll_student')) === null
to this:
_h(get_option('moodle_unenroll_student')) == ''
If that still doesn’t work, then double check to make sure that the enrol_manual_unenrol_users function exists in External Services in Moodle: Home > Site administration > Plugins > Web services > External services
Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignThe css on the field has been fixed in RC4 which will be released later today. I will take a look at the Moodle issue.
Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignThe staff record is fine and working good.
As I am testing out few other things like students records and enrolments, I came across that after the application is accepted, in the student record screen, the field to select the start date, that date selection field has a kind of glitch I think.
and the Moodle plugin is working really good except that after withdrawing the student from course section it should automatically unenroll from Moodle as well, as I have selected “Yes” in Moodle plugin. I think that’s kind of not sure, I tried with a test student everything worked very well except for that part. Am I missing something there?
I think that’s kind of not sure, I tried with a test student everything worked very well except for that part. Am I missing something there?
Attachments:
You must be logged in to view attached files.With regards to creating new staff records, do the following.
Open app/views/staff/add.php and change this:
<?php table_dropdown('job',null,'ID','ID','title'); ?>
to this:
<?php table_dropdown('job',null,'id','id','title'); ?>
In the same file, change all of these:
$person[0]
to this (i.e. $person[0][‘personID’] will become $person[‘personID’]):
$person
Open app/router/staff.router.php and replace the add route with the one below:
$app->match('GET|POST', '/add/(\d+)/', function ($id) use($app) { $get_person = get_person($id); $get_staff = get_staff($id); if ($app->req->isPost()) { try { $staff = $app->db->staff(); $staff->staffID = $id; $staff->schoolCode = $app->req->post['schoolCode']; $staff->buildingCode = $app->req->post['buildingCode']; $staff->officeCode = $app->req->post['officeCode']; $staff->office_phone = $app->req->post['office_phone']; $staff->deptCode = $app->req->post['deptCode']; $staff->status = $app->req->post['status']; $staff->addDate = Jenssegers\Date\Date::now(); $staff->approvedBy = get_persondata('personID'); /** * Fires during the saving/creating of a staff record. * * @since 6.1.12 * @param array $staff Staff object. */ $app->hook->do_action('save_staff_db_table', $staff); $staff->save(); $meta = $app->db->staff_meta(); $meta->jobStatusCode = $app->req->post['jobStatusCode']; $meta->jobID = $app->req->post['jobID']; $meta->staffID = $id; $meta->supervisorID = $app->req->post['supervisorID']; $meta->staffType = $app->req->post['staffType']; $meta->hireDate = $app->req->post['hireDate']; $meta->startDate = $app->req->post['startDate']; $meta->endDate = ($app->req->post['endDate'] != '' ? $app->req->post['endDate'] : NULL); $meta->addDate = Jenssegers\Date\Date::now(); $meta->approvedBy = get_persondata('personID'); /** * Fires during the saving/creating of staff * meta data. * * @since 6.1.12 * @param array $meta Staff meta object. */ $app->hook->do_action('save_staff_meta_db_table', $meta); $meta->save(); /** * Is triggered after staff record has been created. * * @since 6.1.12 * @param mixed $staff Staff data object. */ $app->hook->do_action('post_save_staff', $staff); /** * Is triggered after staff meta data is saved. * * @since 6.1.12 * @param mixed $staff Staff meta data object. */ $app->hook->do_action('post_save_staff_meta', $meta); etsis_logger_activity_log_write('New Record', 'Staff Member', get_name($id), get_persondata('uname')); _etsis_flash()->success(_etsis_flash()->notice(200), get_base_url() . 'staff' . '/' . $id . '/'); } catch (NotFoundException $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (ORMException $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (Exception $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } } /** * If the database table doesn't exist, then it * is false and a 404 should be sent. */ if ($get_person == false) { $app->view->display('error/404', ['title' => '404 Error']); } /** * If the query is legit, but there * is no data in the table, then 404 * will be shown. */ elseif (empty($get_person) == true) { $app->view->display('error/404', ['title' => '404 Error']); } /** * If data is zero, 404 not found. */ elseif (_h($get_person->personID) <= 0) { $app->view->display('error/404', ['title' => '404 Error']); } /** * If staffID already exists, then redirect * the user to the staff record. */ elseif (_h($get_staff->staffID) > 0) { etsis_redirect(get_base_url() . 'staff' . '/' . _h($get_staff->staffID) . '/'); } /** * If we get to this point, the all is well * and it is ok to process the query and print * the results in a html format. */ else { etsis_register_style('form'); etsis_register_script('select'); etsis_register_script('select2'); etsis_register_script('datepicker'); $app->view->display('staff/add', [ 'title' => get_name(_h($get_person->personID)), 'person' => (array) $get_person ] ); } });
Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignWhen I speak of cache in a generic sense, I am always talking about the system’s object cache. eduTrac SIS has it’s own caching system.
What’s suppose to happen during update is that the old cache is supposed to be incremented causing it to become void and deleted two minutes later. At the same time, a new cache is supposed to be generated from the newly saved values.
I’ve updated the Hooks library again and now it should be fixed. It is attached.
Attachments:
You must be logged in to view attached files.Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignAfter changing the index for altID, the new person records can be created.
But I am not sure about the settings, as you have suggested after replacing the file hooks.php the changes are taking effect.
I mean for some reason it may be my PC issue, I am not sure, I can’t see the changes right after changing the value in the field, it’s taking some time to show the values, even reloading doesn’t seem to change.
I will check out staff and see what the issue may be.
For person, go to your PHPMyAdmin, the person table, and drop the unique key for altID: run the following query ALTER TABLE person DROP INDEX altID;
For settings, I think it is a cache issue. Replace app/src/Hooks.php with the one attached, and let me know the outcome.
Attachments:
You must be logged in to view attached files.Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignYes, I was just checking them, After replacing the files with new release some of the issues have been solved like the course section button and the mail format.
I can create course section now and the mail format was good.
Still, the staff record can’t be created, and a new person as well. For the staff record I can’t find any error logs but for the new person, there has been an error generating every time, when I tried to create a new person.
Integrity constraint violation: 1062 Duplicate entry '' for key 'altID' [] []
also in the general settings, it still remains same, multiple fields can’t be updated at the same time.
It may be that some of the files have been missed while uploading?
I am unable to create staff record, it always ends up showing 404 error.
In Generals Settings or in Registration Settings when trying to update multiple fields at the same time, the updates are limited to the single field. I mean at a time I am able to update/change single field.
I can’t seem to have a “Create Section” button, in course field, I can see only “view” and “Clone”. I checked with role and permissions, everything seems fine.
Are these issues still valid now that you are using the correct release candidate?
When creating a person an automated mail will be sent to recipients mail ID but that mail is in HTML format, I mean it’s all in HTML code version.
Is this with or without the SMTP plugin being activated? Can you try both scenarios and let me know the outcome? Thanks.
Joshua Parker
Twitter | Facebook | DigitalOcean | tinyCampaignThere are some other issues that I’ve just come across some other issues.
- In Generals Settings or in Registration Settings when trying to update multiple fields at the same time, the updates are limited to the single field. I mean at a time I am able to update/change single field.
- I can’t seem to have a “Create Section” button, in course field, I can see only “view” and “Clone”. I checked with role and permissions, everything seems fine.
- When creating a person an automated mail will be sent to recipients mail ID but that mail is in HTML format, I mean it’s all in HTML code version.
Attachments:
You must be logged in to view attached files.I am unable to create staff record, it always ends up showing 404 error.
I have super admin role and enabled all the permissions for that role.
There aren’t any error logs as well.
-
This topic was modified 5 years, 7 months ago by
Joshua Parker. Reason: RC4 is not out yet, so updated Release to RC3
Attachments:
You must be logged in to view attached files.
You must be logged in to reply to this topic.