protected function migrateEnrollmentDetail($enrollmentDetail,$enrollment_id)
    {
        try {
            $enrollment = ScoolEnrollmentSubmodule::firstOrNew([
                'enrollment_id' => $enrollment_id,
                'module_id'     => $this->translateModuleId($enrollmentDetail->moduleid),
                'submodule_id'  => $this->translateSubmoduleId($enrollmentDetail->submoduleid),
            ]);
            $enrollment->state='Validated';
            $enrollment->save();
        } catch (\Exception $e) {
            $this->output->error(
                'Error migrating enrollment detail. ' . class_basename($e) . ' ' .  $e->getMessage());
        }
    }