<commit_before>var app = angular.module("ethics-app");


// PUT
app.controller("DocEditController", function($scope, $routeParams, $location, $docService) {

    // API
    $scope.loadData = function() {
        $docService.get($routeParams.doc_id).success(function(response) {
            $scope.doc = response;
        });
    };

    // INIT
    $scope.loadData();
    $scope.isShown = function() {
      return false
    }


    // API-REQUEST
    $scope.next = function() {
        $docService.edit($scope.doc._id, $scope.doc)
        .success(function(response) {
            $scope.doc = response;
            //$location.url("/docs/" + $scope.doc._id + "/ethics");
            $scope.isShown = function() {
              return true
            }<commit_msg>copy first and last name into study description form<commit_after>var app = angular.module("ethics-app");


// PUT
app.controller("DocEditController", function($scope, $routeParams, $location, $docService) {

    // API
    $scope.loadData = function() {
        $docService.get($routeParams.doc_id).success(function(response) {
            //console.log(response);
            $scope.doc = response;
            $scope.doc.general.english.q02 = {}
            $scope.doc.general.english.q02 = angular.copy($scope.doc.first_name + " " + $scope.doc.last_name);
        });
    };

    // INIT
    $scope.loadData();
    $scope.isShown = function() {
      return false
    };

    // API-REQUEST
    $scope.next = function() {
        $docService.edit($scope.doc._id, $scope.doc)
        .success(function(response) {
            $scope.doc = response;
            //$location.url("/docs/" + $scope.doc._id + "/ethics");
            $scope.isShown = function() {
              return true
            }
{'fraction_non_alphanumeric': 0.16015846066779854, 'fraction_numerical': 0.0022637238256932655, 'mean_word_length': 2.112676056338028, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5900480', 'n_tokens_mistral': 542, 'n_tokens_neox': 529, 'n_words': 85}