<commit_before>﻿@model ChalmersxTools.Models.View.EarthSpheresImageToolViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>EarthSpheresImageToolView</title>
    <link href="css/main.css" rel="stylesheet" />
</head>
<body>
    <div>
        <div id="message-box"></div>
        <form id="earth-spheres-images" method="post">
            <div>
                <label for="sphere1Url">Image 1</label>
                <input id="sphere1Url" name="sphere1Url" type="url" style="width: 74%;" value="@Model.Submission.Sphere1Url" />
                <select id="sphere1Name" name="sphere1Name" style="width: 24%;">
                    <option value="">Select sphere</option>
                    <option value="geosphere" @(Model.Submission.Sphere1Name == "geosphere" ? "selected" : "")>Geosphere</option>
                    <option value="atmosphere" @(Model.Submission.Sphere1Name == "atmosphere" ? "selected" : "")>Atmosphere</option>
                    <option value="biosphere" @(Model.Submission.Sphere1Name == "biosphere" ? "selected" : "")>Biosphere</option>
                    <option value="hydrosphere" @(Model.Submission.Sphere1Name == "hydrosphere" ? "selected" : "")>Hydrosphere</option>
                    <option value="cryosphere" @(Model.Submission.Sphere1Name == "cryosphere" ? "selected" : "")>Cryosphere</option>
                </select>
            </div>
            <div>
                <label for="sphere2Url">Image 2</label>
                <input id="sphere2Url" name="sphere2Url" type="url" style="width: 74%;" value="@Model.Submission.Sphere2Url" />
                <select id="sphere2Name" name="sphere2Name" style="width: 24%;">
                    <option value="">Select sphere</option>
                    <option value="geosphere" @(Model.Submission.Sphere2Name == "geosphere" ? "selected" : "")>Geosphere</option>
                    <option value="atmosphere" @(Model.Submission.Sphere2Name == "atmosphere" ? "selected" : "")>Atmosphere</option>
                    <option value="biosphere" @(Model.Submission.Sphere2Name == "biosphere" ? "selected" : "")>Biosphere</option>
                    <option value="hydrosphere" @(Model.Submission.Sphere2Name == "hydrosphere" ? "selected" : "")>Hydrosphere</option>
                    <option value="cryosphere" @(Model.Submission.Sphere2Name == "cryosphere" ? "selected" : "")>Cryosphere</option>
                </select>
            </div>
            <div style="padding-top: 10px;">
                <input type="button" value="Save" onclick="validateAndSubmitForm();">
            </div>
            <input type="hidden" name="action" value="@(Model.Submission == null ? "create" : "edit")">
            <input type="hidden" name="ltiSessionId" value="@Model.LtiSessionId">
        </form>
        @if (Model.Roles == "Administrator" || Model.Roles == "Instructor")
        {
            <br>
            <hr>
            <br>
            <div>
                <p>This information is not visible for students.</p>
                <a href="/Tool/GetData?ltiSessionId=@Model.LtiSessionId">Download data</a>
            </div>
        }
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        function validateAndSubmitForm() {
            $("#message-box").text("");
<commit_msg>Check if submission is null.<commit_after>﻿@model ChalmersxTools.Models.View.EarthSpheresImageToolViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>EarthSpheresImageToolView</title>
    <link href="css/main.css" rel="stylesheet" />
</head>
<body>
    <div>
        <div id="message-box"></div>
        <form id="earth-spheres-images" method="post">
            <div>
                <label for="sphere1Url">Image 1</label>
                <input id="sphere1Url" name="sphere1Url" type="url" style="width: 74%;" value="@Model.Submission.Sphere1Url" />
                <select id="sphere1Name" name="sphere1Name" style="width: 24%;">
                    <option value="">Select sphere</option>
                    <option value="geosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere1Name == "geosphere" ? "selected" : ""))> Geosphere</option>
                    <option value="atmosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere1Name == "atmosphere" ? "selected" : ""))> Atmosphere</option>
                    <option value="biosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere1Name == "biosphere" ? "selected" : ""))> Biosphere</option>
                    <option value="hydrosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere1Name == "hydrosphere" ? "selected" : ""))> Hydrosphere</option>
                    <option value="cryosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere1Name == "cryosphere" ? "selected" : ""))> Cryosphere</option>
                </select>
            </div>
            <div>
                <label for="sphere2Url">Image 2</label>
                <input id="sphere2Url" name="sphere2Url" type="url" style="width: 74%;" value="@Model.Submission.Sphere2Url" />
                <select id="sphere2Name" name="sphere2Name" style="width: 24%;">
                    <option value="">Select sphere</option>
                    <option value="geosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere2Name == "geosphere" ? "selected" : ""))>Geosphere</option>
                    <option value="atmosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere2Name == "atmosphere" ? "selected" : ""))> Atmosphere</option>
                    <option value="biosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere2Name == "biosphere" ? "selected" : ""))> Biosphere</option>
                    <option value="hydrosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere2Name == "hydrosphere" ? "selected" : ""))> Hydrosphere</option>
                    <option value="cryosphere" @(Model.Submission == null ? "" : (Model.Submission.Sphere2Name == "cryosphere" ? "selected" : ""))> Cryosphere</option>
                </select>
            </div>
            <div style="padding-top: 10px;">
                <input type="button" value="Save" onclick="validateAndSubmitForm();">
            </div>
            <input type="hidden" name="action" value="@(Model.Submission == null ? "create" : "edit")">
            <input type="hidden" name="ltiSessionId" value="@Model.LtiSessionId">
        </form>
        @if (Model.Roles == "Administrator" || Model.Roles == "Instructor")
        {
            <br>
            <hr>
            <br>
            <div>
                <p>This information is not visible for students.</p>
                <a href="/Tool/GetData?ltiSessionId=@Model.LtiSessionId">Download data</a>
            </div>
        }
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        function validateAndSubmitForm() {
            $("#message-box").text("");

{'fraction_non_alphanumeric': 0.174402445803224, 'fraction_numerical': 0.01028349082823791, 'mean_word_length': 2.512445095168375, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, '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': '931095', 'n_tokens_mistral': 2289, 'n_tokens_neox': 2090, 'n_words': 368}