php js css php js css

Scripts

Save Script Run
Attached Artifacts
Title
PHP Code
<?php $result = []; $result['grading_enabled'] = \Components\AF\Courses\Assignments\Submissions::gradingIsEnabled(); $result['private_guard_overallocation_seconds'] = \Components\AF\Courses::checkOverAllocation(\Components\AF\Courses\PrivateCourses::get(378), 8 * 3600); $result['membership_card_html_ready'] = (bool) \Components\AF\Memberships::generateMembershipCardHTML(1394); $result['membership_start'] = \Components\AF\Memberships::getColumn(144, 'membership_start_date'); $result['membership_end'] = \Components\AF\Memberships::getColumn(144, 'membership_end_date'); $rows = \Components\AF\Enrollments::getAll(['filter' => ['course_id', '=', 376]]); $result['attendance'] = array_count_values(array_column($rows, 'enrollment_type')); $result['borrowings'] = \Components\AF\Libraries\Documents\Borrowings::getAll(['filter' => ['contact_id', 'IN', [1394,1395]]]); $result['discount_title'] = \Components\Commerce\Discounts::getColumn(26, 'discount_title'); $result['automation'] = \Components\Marketing\Automation::get(75); if (isset($result['automation']['automation_workflow'])) unset($result['automation']['automation_workflow']); echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

Run Log

▼ Today 4:33am ✓ Completed 0.1s
{
    "grading_enabled": true,
    "private_guard_overallocation_seconds": -3600,
    "membership_card_html_ready": true,
    "membership_start": "2026-10-07 00:00:00",
    "membership_end": "2027-10-07 00:00:00",
    "attendance": {
        "makeup": 1,
        "trial": 1,
        "standard": 2
    },
    "borrowings": [
        {
            "borrowing_id": "17",
            "borrowing_datetime": "2026-10-06 00:59:57",
            "contact_id": "1394"
        },
        {
            "borrowing_id": "18",
            "borrowing_datetime": "2026-10-06 00:59:57",
            "contact_id": "1395"
        }
    ],
    "discount_title": "Course exclusion - Presentation Demo",
    "automation": {
        "automation_id": "75",
        "automation_title": "Membership PDF card - Presentation Demo",
        "automation_event": "\\Components\\AF\\Memberships\\Automation\\EventRenewOrAddMembership",
        "automation_event_configuration": {
            "onmembership_products": "products",
            "onmembership_product_entities": [
                519
            ],
            "attach_membership_card": 1
        },
        "automation_is_enabled": "0",
        "automation_is_deleted": "0",
        "automation_system_component": null,
        "automation_created_datetime": "2026-10-08 01:06:02",
        "automation_modified_datetime": "2026-10-08 01:06:02"
    }
}
▶ Today 4:33am ✓ Completed 0.1s
▶ Today 4:33am ✓ Completed 0.1s
▶ Today 4:33am ✗ Error 0.0s