<commit_before>﻿@using WebMatrix.Data;
@{
    // Provider
    var p = LcData.UserInfo.GetRequestedUserRow();
    // Current position data record:
    var pos = PageData["position"];
    
    dynamic vCats = null, verifications = null, licenses = null, education = null;
    var vs = new List<object>();
    using (var db = Database.Open("sqlloco")) {
        vCats = db.Query(@"
            SELECT VerificationCategoryID
                  ,VerificationCategoryName
                  ,VerificationCategoryDescription
            FROM VerificationCategory
            WHERE LanguageID = @0 AND CountryID = @1 AND Active = 1
            ORDER BY RankPosition, VerificationCategoryName
        ", LcData.GetCurrentLanguageID(), LcData.GetCurrentCountryID());
        verifications = db.Query(@"
            SELECT
                V.VerificationType
                ,V.VerificationDescription
                ,V.VerificationCategoryID
                ,UV.VerificationStatusID
                ,VS.VerificationStatusName
                ,UV.DateVerified As ExpirationDate
                ,UV.LastVerifiedDate
                ,UV.Comments
            FROM
                Verification As V
                 INNER JOIN
                UserVerification As UV
                  ON V.VerificationID = UV.VerificationID
                 INNER JOIN
                VerificationStatus As VS
                  ON VS.VerificationStatusID = UV.VerificationStatusID
            WHERE
                UV.UserID = @0
                 AND
                UV.VerificationStatusID = 1 -- Confirmed
                 AND
                (
                 -- Verification for any position (per user)
                 UV.PositionID = 0
                  OR
                 -- Verification for this position
                 UV.PositionID = @1
                )
            ORDER BY V.RankPosition, V.VerificationType
        ", p.UserID, p.PositionID);
        licenses = db.Query(LcData.sqlGetVerifiedUserLicenses + " AND PositionID = @1", p.UserID, pos.PositionID);
        education = db.Query(LcData.sqlSelectFromUserEducation +
        @"
            WHERE   UserID = @0
                     AND
                    Active = 1<commit_msg>Fixed an error in profile/verifications page #324<commit_after>﻿@using WebMatrix.Data;
@{
    // Provider
    var p = LcData.UserInfo.GetRequestedUserRow();
    // Current position data record:
    var pos = PageData["position"];
    
    dynamic vCats = null, verifications = null, licenses = null, education = null;
    var vs = new List<object>();
    using (var db = Database.Open("sqlloco")) {
        vCats = db.Query(@"
            SELECT VerificationCategoryID
                  ,VerificationCategoryName
                  ,VerificationCategoryDescription
            FROM VerificationCategory
            WHERE LanguageID = @0 AND CountryID = @1 AND Active = 1
            ORDER BY RankPosition, VerificationCategoryName
        ", LcData.GetCurrentLanguageID(), LcData.GetCurrentCountryID());
        verifications = db.Query(@"
            SELECT
                V.VerificationType
                ,V.VerificationDescription
                ,V.VerificationCategoryID
                ,UV.VerificationStatusID
                ,VS.VerificationStatusName
                ,UV.DateVerified As ExpirationDate
                ,UV.LastVerifiedDate
                ,UV.Comments
            FROM
                Verification As V
                 INNER JOIN
                UserVerification As UV
                  ON V.VerificationID = UV.VerificationID
                 INNER JOIN
                VerificationStatus As VS
                  ON VS.VerificationStatusID = UV.VerificationStatusID
            WHERE
                UV.UserID = @0
                 AND
                UV.VerificationStatusID = 1 -- Confirmed
                 AND
                (
                 -- Verification for any position (per user)
                 UV.PositionID = 0
                  OR
                 -- Verification for this position
                 UV.PositionID = @1
                )
            ORDER BY V.RankPosition, V.VerificationType
        ", p.UserID, pos.PositionID);
        licenses = db.Query(LcData.sqlGetVerifiedUserLicenses + " AND PositionID = @1", p.UserID, pos.PositionID);
        education = db.Query(LcData.sqlSelectFromUserEducation +
        @"
            WHERE   UserID = @0
                     AND
                    Active = 1
{'fraction_non_alphanumeric': 0.06932021466905187, 'fraction_numerical': 0.005143112701252236, 'mean_word_length': 1.425704989154013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2258824', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1048, 'n_words': 265}