services:
    ujm.listener.exercise_listener:
        class: UJM\ExoBundle\Listener\ExerciseListener
        calls:
            - [setContainer, ["@service_container"]]
        tags:
            - { name: kernel.event_listener, event: create_form_ujm_exercise, method: onCreateForm }
            - { name: kernel.event_listener, event: create_ujm_exercise, method: onCreate }
            - { name: kernel.event_listener, event: open_ujm_exercise, method: onOpen }
#      - { name: kernel.event_listener, event: export_ujm_exercise, method: onExport }
            - { name: kernel.event_listener, event: delete_ujm_exercise, method: onDelete }
            - { name: kernel.event_listener, event: copy_ujm_exercise, method: onCopy }
#      - { name: kernel.event_listener, event: plugin_options_ujmexo, method: onAdministrate }
            - { name: kernel.event_listener, event: open_tool_desktop_ujm_questions, method: onDisplayDesktop}

    ujm.listener.exercise.display_log_listener:
            class: UJM\ExoBundle\Listener\Log\DisplayLogListener
            calls:
                - [setContainer, ["@service_container"]]
            tags:
                - { name: kernel.event_listener, event: create_log_details_resource-ujm_exercise-exercise_evaluated, method: onCreateLogDetails }

    twig.extension.twigExtensions:
        class: UJM\ExoBundle\Services\twig\twigExtensions
        arguments: [@doctrine, @ujm.exercise_services]
        tags:
            - { name: twig.extension }

    ujm.exercise_services:
        class: UJM\ExoBundle\Services\classes\exerciseServices
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @security.authorization_checker, @event_dispatcher, @doctrine]

    ujm.qti_qcm_export:
        class: UJM\ExoBundle\Services\classes\QTI\qcmExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_qcm_import:
        class: UJM\ExoBundle\Services\classes\QTI\qcmImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_graphic_export:
        class: UJM\ExoBundle\Services\classes\QTI\graphicExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_graphic_import:
        class: UJM\ExoBundle\Services\classes\QTI\graphicImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_hole_export:
        class: UJM\ExoBundle\Services\classes\QTI\holeExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_hole_import:
        class: UJM\ExoBundle\Services\classes\QTI\holeImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_open_long_export:
        class: UJM\ExoBundle\Services\classes\QTI\openLongExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_open_long_import:
        class: UJM\ExoBundle\Services\classes\QTI\openLongImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_open_one_word_export:
        class: UJM\ExoBundle\Services\classes\QTI\openOneWordExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_open_one_word_import:
        class: UJM\ExoBundle\Services\classes\QTI\openOneWordImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_open_short_export:
        class: UJM\ExoBundle\Services\classes\QTI\openShortExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_open_short_import:
        class: UJM\ExoBundle\Services\classes\QTI\openShortImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_matching_export:
        class: UJM\ExoBundle\Services\classes\QTI\matchingExport
        scope: prototype
        arguments: [@doctrine, @security.token_storage, @service_container]

    ujm.qti_matching_import:
        class: UJM\ExoBundle\Services\classes\QTI\matchingImport
        scope: prototype
        arguments: [@claroline.persistence.object_manager, @security.token_storage, @service_container]

    ujm.qti_repository:
        class: UJM\ExoBundle\Services\classes\QTI\qtiRepository
        arguments: [@security.token_storage, @service_container]

    ujm.qti_services:
        class: UJM\ExoBundle\Services\classes\QTI\qtiServices

    ujm.exercise.validator.isvalidqcmglobalmark:
        class: UJM\ExoBundle\Validator\Constraints\isValidQCMGlobalMarkValidator
        arguments: [@request]
        scope: request
        tags:
            - { name: validator.constraint_validator, alias: ujm.exercise_isvalidqcmglobalmark }

    ujm.exercise.validator.isvalidqcmmark:
        class: UJM\ExoBundle\Validator\Constraints\isValidQCMMarkValidator
        arguments: [@request]
        scope: request
        tags:
            - { name: validator.constraint_validator, alias: ujm.exercise_isvalidqcmmark }
