Unable to Submit PowerSchool Absence Reports


If you can't submit an attendance report on PowerSchool and the absence is not for the full day, set it as a full day anyway until the problems discussed here get solved. Include that the form could not be submitted otherwise in the explanation.

If you can't edit an attendance report after submitting it, inspect the "Edit" button, and remove disabled="disabled" from the HTML.

The Origins of These Problems

Submitting an Absence Form

I filled out the form with the following information:

Absence Date: 12/3/2024
Leave second date empty if only reporting single day absence.
What is the reason for the absence?: Travel
Is this absence for the whole day?: No
Explanation: Blah, blah, not important for this example, blah, blah, blah.

The "Submit" button calls the submitRequest function.

<button ng-click="submitRequest()" ng-show="input.id < 0">Submit</button>

This function calls the isValidForm function. In that function, it calls multiple functions to check if the form is valid.

$scope.isValidForm = (isOnSubmit) => {
    $scope.resetFormErrors()

    for (const k in $scope.formErrors) {
        $scope.formErrors[k] = 0;
    }

    let valid = $scope.input.dateStart !== "";
    valid = $scope.verifyReason(valid)
    valid = $scope.verifyDates(valid)
    valid = $scope.verifyExplination(valid)
    valid = $scope.verifyTimes(valid)

    if(!isOnSubmit) {
        for (const k in $scope.formErrors) {
            $scope.formErrors[k] = 0;
        }
    }

    return valid;
}

The verifyTimes function returns that it is valid if the absence is for the entire day. Otherwise, it performs multiple checks that do not seem to be written correctly, as my form was not able to submitted until I set that it was for the whole day.

$scope.verifyTimes = (valid) => {
    if($scope.input.allday == "1") {
        return true;
    }

    $scope.formErrors.timesRequired = 0;

    if($scope.input.timeStart.length == 0 || $scope.input.timeEnd.length == 0) {
        $scope.formErrors.timesRequired = 1;
        return false
    }

    const startSeconds = apiam.timeToSeconds($scope.input.timeStart);
    const endSeconds = apiam.timeToSeconds($scope.input.timeEnd);
    const bridgeStart = Number($scope.bridgePeriodInfo.daily_time_in_default)
    const bridgeEnd = Number($scope.bridgePeriodInfo.daily_time_out_default)

    // check if neither of the start or end time entered falls in the bridge period default time
    if(!(
        (bridgeStart <= startSeconds && startSeconds <= bridgeEnd) ||
        (bridgeStart <= endSeconds && endSeconds <= bridgeEnd)
    )) {
        $scope.formErrors.invalidTime = 1;
        return false
    }

    return true
}

Editing an Absence Report

The button to edit a report looks like this:

<button ng-if="canCreate" ng-disabled="!canEdit || !r.canEdit" disabled="disabled">Edit</button>

It is not possible to use the button unless you inspect the HTML and remove the part that says disabled="disabled".