You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to check the the assignment module actually exists before continuing with the rest of the assignments:
In /app/Console/Kernel.php around line 75:
The code is CURRENTLY like this...
$module = Module::where('id',$bulkAssignment->assignment->module_id)->with('current_version')->first();
if (is_null($module->module_version_id)) {
// Do Nothingcontinue;
}
It should be changed to something like this...
$module = Module::where('id',$bulkAssignment->assignment->module_id)->with('current_version')->first();
if (is_null($module) || is_null($module->module_version_id)) {
// Do Nothingcontinue;
}
If $module is null, the following error is thrown:
[2020-12-26 02:30:01] prod.ERROR: Trying to get property 'module_version_id' of non-object {"exception":"[object] (ErrorException(code: 0): Trying to get property 'module_version_id' of non-object at /var/app/current/app/Console/Kernel.php:76)
Additionally, to address any other possible issues, around each bulk assignment, we need to add a try / catch block. This should be between likes 73 and 74 (or thereabouts):
foreach($bulkAssignmentsas$bulkAssignment){
// We should add a "try" block in here in case any errors are thrown within the bulk assignmentif(Carbon::parse($bulkAssignment->assignment->later_assignment_date)->isToday()){
Additionally, we need to make sure that "Module" is a required field on the bulk assignment form. (You MUST select a module, or the form should not validate):
We should also look at any other fields which might need to be required.
The text was updated successfully, but these errors were encountered:
Fault prevention mechanisms have been added to the required places in Kernel.php, such as adding try/catch blocks, adding additional conditions in the if statements those are determining if an assignment should be made, and etc.
Please see the fields those were made required throughout the BComply app to prevent any additional bugs in the future:
Bulk Assignments
Module To Assign when configuring a the bulk assignment.
Column and Value fields those are under the AND/OR Conditional fields when configuring a the bulk assignment..
Auto Assign Date, if Assign Later is selected
Groups
Group Name field when creating a new group.
Group Memberships
User field when adding a new member in to a group.
Module Assignments
User field when adding a new assignment.
Status field is now required to prevent a blank status when Marking as completed.
Date fields those are visible when Date Started or Date Completed fields are selected.
Module Permissions
User field is now required when providing a module privilege to a user.
Module Versions
Version Name
Launch URL if the version type is Articulate Tincan
Youtube Code if the version type is Youtube
Reports
Report Name when creating a new report
Column and Value fields those are under the AND/OR Conditional fields
Value field is now visible or hidden according to the values selected in column fields.
It has the same conditional hide/ show as it has in the Bulk Assignment Configuration pop-up window.
Users
Unique ID and Email fields are now required fields when creating a new user and updating the user attributes.
The most up to date code is now in the BComply environment and it seems to be working fine so far. I will post another update once we think everything is working as expected and we are ready to go live. In order for me to complete the tests, I will need to wait for Bulk Assignment to run tomorrow (at 2am or 2:30am?) as scheduled.
Need to check the the assignment module actually exists before continuing with the rest of the assignments:
In
/app/Console/Kernel.php
around line 75:The code is CURRENTLY like this...
It should be changed to something like this...
If
$module
is null, the following error is thrown:Additionally, to address any other possible issues, around each bulk assignment, we need to add a try / catch block. This should be between likes 73 and 74 (or thereabouts):
Additionally, we need to make sure that "Module" is a required field on the bulk assignment form. (You MUST select a module, or the form should not validate):
We should also look at any other fields which might need to be required.
The text was updated successfully, but these errors were encountered: