<commit_before><main class="container">
    <h4 class="header">Notes</h4>
    <div class="section">
        <?php
        if (!empty($data['marks'])) {
            $last_subject = null;
            $subjectSum = 0;
            $subjectCount = 0;

            foreach ($data['marks'] as $mark):
                // If new subject, put header
                if ($mark->subjectCode !== $last_subject):
                    if (!is_null($last_subject))
                    { ?>
                                <div class="divider clearfix"></div>
                                <div class="footer left-align">
                                    <span class="flow-text">
                                        Moyenne : <?= $subjectSum / $subjectCount ?>
                                        <small>/20</small>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                        <?php
                        $subjectSum = 0;
                        $subjectCount = 0;
                    }

                    $last_subject = $mark->subjectCode;
                    ?><div class="card grey lighten-5">
                        <div class="card-content">
                            <div class="card-title row">
                                <div class="col s12 m6">
                                    <i class="material-icons small left">school</i>
                                    <h5><?= $mark->subjectCode . ' - ' . $mark->subjectName ?></h5>
                                </div>
                                <div class="col s12 m6 right-align">
                                    <span>Coefficient : <?= floatval($mark->subjectCoefficient) ?></span>
                                </div>
                            </div>
                            <div class="divider row"></div>
                            <div class="row center-align">
                                <?php
                endif; // if change subject

                $subjectSum += floatval($mark->value) / floatval($mark->divisor) * 20 * floatval($mark->coefficient);
                $subjectCount += floatval($mark->coefficient);
                ?>
                                <div class="col s12 m6 l4 xl3">
                                    <div class="card card-content grey lighten-4">
                                        <span class="card-title"><?= $mark->controlName; ?></span>
                                        <p>Note : <?= floatval($mark->value) . ' / ' . floatval($mark->divisor) ?></p>
                                        <p>Date : <?= (new DateTime($mark->controlDate))->format('d/m/Y') ?></p>
                                        <p>Coefficient : <?= floatval($mark->coefficient) ?></p>
                                        <p>Moyenne
                                            : <?= isset($mark->average) ? $mark->average : 'Non calculée' ?></p>
                                        <p>Médiane
                                            : <?= isset($mark->median) ? $mark->median : 'Non calculée' ?></p>
                                    </div>
                                </div>
                                <?php
            endforeach; // foreach marks
            ?>
                                <div class="divider clearfix"></div>
                                <div class="footer left-align">
                                    <span class="flow-text">
                                        Moyenne : <?= $subjectSum / $subjectCount ?>
                                        <small>/20</small>
                                    </span>
                                </div><commit_msg>Séparation notes / détails<commit_after><main class="container">
    <h4 class="header">Notes</h4>
    <div class="section">
        <?php
        if (!empty($data['marks'])) {
            $last_subject = null;
            $subjectSum = 0;
            $subjectCount = 0;

            foreach ($data['marks'] as $mark):
                // If new subject, put header
                if ($mark->subjectCode !== $last_subject):
                    if (!is_null($last_subject))
                    { ?>
                                <div class="divider clearfix"></div>
                                <div class="footer left-align">
                                    <span class="flow-text">
                                        Moyenne : <?= $subjectSum / $subjectCount ?>
                                        <small>/20</small>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                        <?php
                        $subjectSum = 0;
                        $subjectCount = 0;
                    }

                    $last_subject = $mark->subjectCode;
                    ?><div class="card grey lighten-5">
                        <div class="card-content">
                            <div class="card-title row">
                                <div class="col s12 m6">
                                    <i class="material-icons small left">school</i>
                                    <h5><?= $mark->subjectCode . ' - ' . $mark->subjectName ?></h5>
                                </div>
                                <div class="col s12 m6 right-align">
                                    <span>Coefficient : <?= floatval($mark->subjectCoefficient) ?></span>
                                </div>
                            </div>
                            <div class="divider row"></div>
                            <div class="row center-align">
                                <?php
                endif; // if change subject

                $subjectSum += floatval($mark->value) / floatval($mark->divisor) * 20 * floatval($mark->coefficient);
                $subjectCount += floatval($mark->coefficient);
                ?>
                                <div class="col s12 m6 l4 xl3">
                                    <div class="card grey lighten-4">
                                        <div class="card-content">
                                            <span class="card-title activator"><?= $mark->controlName ?></span>
                                            <div class="section">
                                                <p><b>Note : <?= floatval($mark->value) . ' / ' . floatval($mark->divisor) ?></b></p>
                                                <p>Coefficient : <?= floatval($mark->coefficient) ?></p>
                                            </div>
                                        </div>
                                        <div class="card-reveal">
                                            <span class="card-title truncate">Détails</span>
                                            <p>Date : <?= (new DateTime($mark->controlDate))->format('d/m/Y') ?></p>
                                            <p>Moyenne : <?= isset($mark->average) ? $mark->average : 'Non calculée' ?></p>
                                            <p>Médiane : <?= isset($mark->median) ? $mark->median : 'Non calculée' ?></p>
                                        </div>
                                    </div>
                                </div>
                                <?php
            endforeach; // foreach marks
            ?>
                                <div class="divider clearfix"></div>
                                <div class="footer left-align">
                                    <span class="flow-text">
                                        Moyenne : <?= $subjectSum / $subjectCount ?>
                                        <small>/20</small>
                                    </span>
                                </div>
{'fraction_non_alphanumeric': 0.1241682360326428, 'fraction_numerical': 0.006779661016949152, 'mean_word_length': 0.7639503985828167, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 0, '>': 191, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 62, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4991710', 'n_tokens_mistral': 1768, 'n_tokens_neox': 1657, 'n_words': 335}