{% set layout = "ClarolineCoreBundle:Workspace:layout.html.twig" %} {% if isDesktop() %} {% set layout = "ClarolineCoreBundle:Desktop:layout.html.twig" %} {% endif %} {% extends layout %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block title %} {{ 'correction' | trans }} {% endblock %} {% block resourceBreadcrumb %}
  • {{ _resource.getResourceNode().getName() }}
  • {{ 'paper' | trans }}
  • {% endblock %} {% block section_content %}

    {{ 'correction' | trans }}

    {{ 'home exercise' | trans }} {{ 'paper list' | trans }} {% if retryButton %} {{ 'start again' | trans }} {% endif %} {% set exoMark = 0 %} {% set exoScoreMax = 0 %} {% set temporaryMark = false %} {% if p >= 0 %} {#--------------------------------------------------- QCM ----------------------------------------------------#} {% if(interactions[p].type == 'InteractionQCM') %} {% set interInfo = getInterTwig(interactions[p].id, 'InteractionQCM') %} {% set inter = interInfo['question'] %} {{ inter.sortChoices() }}
    {% if (display == 'all') %} {% include "UJMExoBundle:Partial:correction/qcm.html.twig" %} {% include "UJMExoBundle:Partial:correction/interactionScore.html.twig" %} {% endif %}
    {#------------------------------------------------- Graphic ------------------------------------------------------#} {% elseif(interactions[p].type == 'InteractionGraphic') %} {% set interInfo = getInterTwig(interactions[p].id, 'InteractionGraphic') %} {% set inter = interInfo['question'] %} {% set coords = getCoordsGraphTwig(inter.id) %} {% set maxScore = 0 %} {% if (display == 'all') %}
    {% include "UJMExoBundle:Partial:correction/graphic.html.twig" %}
    AnswerImage {% set repco = responses[p].response|split(';') %} {% set x = 0 %} {% for c in coords %} {% set maxScore = maxScore + coords[x].scoreCoords %} {% set numb = coords[x].value|split(',') %} {% if repco[x] is defined %} {% set repcoX = repco[x]|split('-') %} {% endif %} RightAnswer{{ x }} AnswerZone{{ x }} {% if repcoX[0] is defined and repcoX[0] != '' %} {% set abscissa = repcoX[0] %} {% set ordoninate = repcoX[1] %} {% else %} {% set abscissa = 'a' %} {% set ordoninate = 'a' %} {% endif %} {% set x = x + 1 %} {% endfor %}
    {% include "UJMExoBundle:Partial:correction/interactionScore.html.twig" %} {% else %} {% set x = 0 %} {% for c in coords %} {% set maxScore = maxScore + coords[x].scoreCoords %} {% set x = x + 1 %} {% endfor %} {% endif %} {#--------------------------------------------------- Hole -------------------------------------------------------#} {% elseif(interactions[p].type == 'InteractionHole') %} {% set interInfo = getInterTwig(interactions[p].id, 'InteractionHole') %} {% set inter = interInfo['question'] %}
    {% if (display == 'all') %} {% include "UJMExoBundle:Partial:correction/hole.html.twig" %} {% include "UJMExoBundle:Partial:correction/interactionScore.html.twig" %} {% endif %}
    {#--------------------------------------------------- Open -------------------------------------------------------#} {% elseif(interactions[p].type == 'InteractionOpen') %} {% set interInfo = getInterTwig(interactions[p].id, 'InteractionOpen') %} {% set inter = interInfo['question'] %}
    {% if (display == 'all') %} {% include "UJMExoBundle:Partial:correction/open.html.twig" %} {% include "UJMExoBundle:Partial:correction/interactionScore.html.twig" %}
    {% if inter.typeopenquestion == 'long' and admin == 1 %} {% if responses[p].id != '' %} {% set url = path('ujm_paper_mark_open_question', {'respid': responses[p].id, 'maxScore': interInfo['maxScore']}) %} {{ 'mark this question' | trans }} {% endif %} {% endif %} {% endif %}
    {#--------------------------------------------------- Matching ----------------------------------------------------#} {% elseif(interactions[p].type == 'InteractionMatching') %} {% set interInfo = getInterTwig(interactions[p].id, 'InteractionMatching') %} {% set inter = interInfo['question'] %} {% set tabsResponses = initTabResponseMatching(responses[p].response, inter) %} {% set tabResponseIndex = tabsResponses[0] %} {% set tabRightResponse = tabsResponses[1] %}
    {% if (display == 'all') %} {% include "UJMExoBundle:Partial:correction/matching.html.twig" %} {% include "UJMExoBundle:Partial:correction/interactionScore.html.twig" %} {% endif %}
    {% endif %} {% endif %} {% if p == -2 or p == -1%} {% if p == -1 %} {% endif %}
    {% if (display == 'all' or display == 'score') %} {% set scoreFinal = scorePaper / maxExoScore %} {% set scoreFinal = scoreFinal * 20 %}

    {% if scoreTemp == true %} {{ "temporary mark" | trans }} : {% else %} {{ 'final mark' | trans }} : {% endif %} {% set scoreFinal = roundUpOrDown(scoreFinal) %} {{ scoreFinal }} / 20

    {% include "UJMExoBundle:Partial:badgeInfos/infos.html.twig" %} {% include "UJMExoBundle:Partial:correction/attemptInfo.html.twig" %}
    {% endif %} {% set needLegend = false %}

    {{ 'list of question' | trans }} :

      {% set i = 0 %} {% for interaction in interactions %} {% if (display == 'all') %} {% if responses[i].mark == -1 %} {% set needLegend = true %}
    1. {{ interaction.question.title }}
    2. {% else %}
    3. {{ interaction.question.title }}
    4. {% endif %} {% else %}
    5. {{ interaction.question.title }}
    6. {% endif %} {% set i = i + 1 %} {% endfor %}
    {% if needLegend == true %}
    ( {{ 'need Correction' | trans }} ).
    {% endif %} {% endif %}
    {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}