<commit_before>/**
 *
 */
var EasyAssess = require('../../easyassess.application');

EasyAssess.directives["esFormGroupSpecimensAssess"]
    = EasyAssess.app.directive("esFormGroupSpecimensAssess", function (ngDialog,esRequestService) {
    return {
        restrict: 'E',
        replace: true,
        transclude: false,
        scope: {
            esGroup:"=",
            esData:"=?",
            esForm:"=?"
        },
        template:'<div>'
        +					'<table  border="0" cellspacing="0" cellpadding="0" style="float:left;">'
        +						'<tr>'
        +							'<td class="es-form-group-cell" ng-repeat="specimen in specimens"><table><tr><td class="es-add-button" style="min-width: 50px" ng-click="addNewSample(specimen, $index)"><span>{{specimen.specimenCode}}</span></td><td><span class="glyphicon glyphicon-remove es-delete-button" ng-click="removeColumn(specimen)"></span></td></tr></table></td>'
        +						'</tr>'
        +						'<tr ng-repeat="row in esGroup.rows" style="height: 46px;">'
        +							'<td class="es-form-group-cell" ng-repeat="specimen in specimens"><div ng-if="isInput(row, specimen).show ==\'true\'"><div ng-if="isInput(row, specimen).input==\'true\'"><input id="{{row.guid}}-{{specimen.guid}}" type="number" class="form-control es-form-group-contorl" ng-blur="valueChanged(row, specimen, $event)" ></div><div ng-if="isInput(row, specimen).select==\'true\'"><select id="{{row.guid}}-{{specimen.guid}}" class="form-control es-form-group-contorl" ng-blur="valueChanged(row, specimen, $event)"><option value=""></option><option ng-repeat="option in getOptions(row, specimen)" value="{{option.value}}">{{option.value}}</option></select></div></td>'
        +						'</tr>'
        +					'</table>'
        +        '</div>',

        controller: ["$scope", function($scope, $element, $attrs){
            $scope.specimens = [];

            function getPlainSpecimen(code, specimen) {
                var safeCode = code.replace('/', '%slash%');
                var url = EasyAssess.activeEnv['assess']() + 'assessment/' +$scope.esData + '/group/' + $scope.esGroup.guid + '/specimen/guid/' + safeCode;
                esRequestService.esGet(url).then(function(res){
                    if(res.data.length >0){
                        _updateSpecimanList(res.data, code, specimen);
                    }
                });
            }

            for (var key in $scope.esGroup.specimens){
                var groupSpecimen = $scope.esGroup.specimens[key];<commit_msg>fix slash issue<commit_after>/**
 *
 */
var EasyAssess = require('../../easyassess.application');

EasyAssess.directives["esFormGroupSpecimensAssess"]
    = EasyAssess.app.directive("esFormGroupSpecimensAssess", function (ngDialog,esRequestService) {
    return {
        restrict: 'E',
        replace: true,
        transclude: false,
        scope: {
            esGroup:"=",
            esData:"=?",
            esForm:"=?"
        },
        template:'<div>'
        +					'<table  border="0" cellspacing="0" cellpadding="0" style="float:left;">'
        +						'<tr>'
        +							'<td class="es-form-group-cell" ng-repeat="specimen in specimens"><table><tr><td class="es-add-button" style="min-width: 50px" ng-click="addNewSample(specimen, $index)"><span>{{specimen.specimenCode}}</span></td><td><span class="glyphicon glyphicon-remove es-delete-button" ng-click="removeColumn(specimen)"></span></td></tr></table></td>'
        +						'</tr>'
        +						'<tr ng-repeat="row in esGroup.rows" style="height: 46px;">'
        +							'<td class="es-form-group-cell" ng-repeat="specimen in specimens"><div ng-if="isInput(row, specimen).show ==\'true\'"><div ng-if="isInput(row, specimen).input==\'true\'"><input id="{{row.guid}}-{{specimen.guid}}" type="number" class="form-control es-form-group-contorl" ng-blur="valueChanged(row, specimen, $event)" ></div><div ng-if="isInput(row, specimen).select==\'true\'"><select id="{{row.guid}}-{{specimen.guid}}" class="form-control es-form-group-contorl" ng-blur="valueChanged(row, specimen, $event)"><option value=""></option><option ng-repeat="option in getOptions(row, specimen)" value="{{option.value}}">{{option.value}}</option></select></div></td>'
        +						'</tr>'
        +					'</table>'
        +        '</div>',

        controller: ["$scope", function($scope, $element, $attrs){
            $scope.specimens = [];

            function getPlainSpecimen(code, specimen) {
                var safeCode = code.replace('/', '**slash**');
                var url = EasyAssess.activeEnv['assess']() + 'assessment/' +$scope.esData + '/group/' + $scope.esGroup.guid + '/specimen/guid/' + safeCode;
                esRequestService.esGet(url).then(function(res){
                    if(res.data.length >0){
                        _updateSpecimanList(res.data, code, specimen);
                    }
                });
            }

            for (var key in $scope.esGroup.specimens){
                var groupSpecimen = $scope.esGroup.specimens[key];
{'fraction_non_alphanumeric': 0.19944378228049264, 'fraction_numerical': 0.0031783869686134287, 'mean_word_length': 2.7658937920718025, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 77, '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': '3015013', 'n_tokens_mistral': 1683, 'n_tokens_neox': 1541, 'n_words': 237}