<commit_before>﻿extends structure/default.jade

block append scripts
    script(src="/scripts/file.js")

block content
    .container
        if !file.final
            #nonFinalAlert
                .alert.alert-info
                    p
                        strong This handin is pending!
                    p This assignment was handed in for you by another user
                    .nonFinalHandin(id=file.assignment._id)
                        #uploadButtons(assignment=file.assignment._id)
                            .btn.btn-success.acceptNonFinal() Accept
                            .btn.btn-danger.declineNonFinal Decline
                hr
        h2= file.assignment.project.name
        h3 Information
        p Student: #{file.student.name} #{file.student.surename}
        p Group:
        ul
            for student in file.partners
                li #{student.name} #{student.surename}
        p Handed in on: 
            date= file.timestamp
        p Assignment was due on: 
            date= file.assignment.due
        p Additional assignment info: 
            a(href=file.assignment.project.info) link
        p Uploaded file: 
            - var extension = typeof file.extension == "undefined"? "py" : file.extension
            a(href="https://atlasprogramming.file.core.windows.net/handins/projects/" + group + "/" + file.student._id + "/" + file.assignment.project.id + "." + extension + "?" + token) link
            |&nbsp;(only available for uploads done after 29th of November)
        hr
        if file.assignment.project.type == "auto_code"
            #displayResults(data=file.json project=file.assignment.project._id)
                if file.json.length == 0
                    p Sorry the old result format cannot be displayed. Results you hand in from now on will be displayed here.
            hr
        if file.assignment.project.type == "auto_code"
            h3 Reflection
            p= file.reflection.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
        else if file.reflection.length > 0 && file.reflection != " "
            h3 Additional Comments
            p= file.reflection.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
            hr
        h3 Feedback
        if file.final
            if admin
                textarea.form-control#feedback(rows="5" placeholder="Write feedback on the assignment here...")= file.feedback
                p#feedbackMessage
                button.btn.btn-success#updateFeadback(type="button" file=file._id) Update Feedback
            else
                if file.feedback.length > 0
                    p= file.feedback.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
                else
                    p You did not receive any feedback yet
        else
            p You cannot receive feedback on pending handins!<commit_msg>fixed html string not being formated in file page<commit_after>﻿extends structure/default.jade

block append scripts
    script(src="/scripts/file.js")

block content
    .container
        if !file.final
            #nonFinalAlert
                .alert.alert-info
                    p
                        strong This handin is pending!
                    p This assignment was handed in for you by another user
                    .nonFinalHandin(id=file.assignment._id)
                        #uploadButtons(assignment=file.assignment._id)
                            .btn.btn-success.acceptNonFinal() Accept
                            .btn.btn-danger.declineNonFinal Decline
                hr
        h2= file.assignment.project.name
        h3 Information
        p Student: #{file.student.name} #{file.student.surename}
        p Group:
        ul
            for student in file.partners
                li #{student.name} #{student.surename}
        p Handed in on: 
            date= file.timestamp
        p Assignment was due on: 
            date= file.assignment.due
        p Additional assignment info: 
            a(href=file.assignment.project.info) link
        p Uploaded file: 
            - var extension = typeof file.extension == "undefined"? "py" : file.extension
            a(href="https://atlasprogramming.file.core.windows.net/handins/projects/" + group + "/" + file.student._id + "/" + file.assignment.project.id + "." + extension + "?" + token) link
            |&nbsp;(only available for uploads done after 29th of November)
        hr
        if file.assignment.project.type == "auto_code"
            #displayResults(data=file.json project=file.assignment.project._id)
                if file.json.length == 0
                    p Sorry the old result format cannot be displayed. Results you hand in from now on will be displayed here.
            hr
        if file.assignment.project.type == "auto_code"
            h3 Reflection
            p!= file.reflection.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
        else if file.reflection.length > 0 && file.reflection != " "
            h3 Additional Comments
            p!= file.reflection.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
            hr
        h3 Feedback
        if file.final
            if admin
                textarea.form-control#feedback(rows="5" placeholder="Write feedback on the assignment here...")= file.feedback
                p#feedbackMessage
                button.btn.btn-success#updateFeadback(type="button" file=file._id) Update Feedback
            else
                if file.feedback.length > 0
                    p!= file.feedback.replace(new RegExp("\n", 'g'), "<br>").replace(new RegExp("  ", 'g'), " &nbsp")
                else
                    p You did not receive any feedback yet
        else
            p You cannot receive feedback on pending handins!
{'fraction_non_alphanumeric': 0.10539671798342073, 'fraction_numerical': 0.003721874471324649, 'mean_word_length': 1.730715935334873, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3574127', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1521, 'n_words': 429}