<commit_before>(function(angular){
  'use strict';

  function atAssessmentCtrl($scope,atAssessment,atSubmission,$mdToast){
    console.log(this,$scope);
    atAssessment.load($scope.assessmentId).success(function(){
      $scope.assessment = atAssessment.current
    }).error(function(){
      $mdToast.show({
        template : '<md-toast>Error !</md-toast>'
      })
    });
    $scope.reset = atSubmission.resetCurrent;
    $scope.submit = atSubmission.submitCurrent;
  }

  function atAssessmentEditor(){
    return {
      restrict : 'EA',
      scope : {
        assessmentId : '='
      },
      templateUrl :'assessment/assessment.tpl.html',
      controller : 'atAssessmentCtrl',
      transclude : true
    }
  }

  function atAssessmentProvider(){

    var options = {
      baseUrl : 'localhost/'
    };

    this.config = function(param){
      angular.extend(options,param);
    };

    function Assessment($http){
      var assessment = {};

      assessment.current = {};

      assessment.load = function (assessmentId) {
        return $http.get(options.baseUrl + assessmentId).success(function (data) {
          assessment.current = data;
        });
      };

      return assessment;
    }

    this.$get = Assessment;
  }


  angular.module('at.assessment.editor',[
    'ui.ace',
    'at.assessment.submission'
  ]).directive('atAssessmentEditor',atAssessmentEditor)
    .controller('atAssessmentCtrl',atAssessmentCtrl)
    .provider('atAssessment',atAssessmentProvider);
})(angular);


<commit_msg>directive change<commit_after>(function(angular){
  'use strict';

  function atAssessmentCtrl($scope,atAssessment,atSubmission,$mdToast){
    console.log(this,$scope);
    atAssessment.load($scope.assessmentId).success(function(){
      $scope.assessment = atAssessment.current;
      atSubmission.current.code = angular.copy(atAssessment.current.startCode);
    }).error(function(){
      $mdToast.show({
        template : '<md-toast>Error !</md-toast>'
      })
    });
    $scope.reset = atSubmission.resetCurrent;
    $scope.submit = atSubmission.submitCurrent;
  }

  function atAssessmentEditor(){
    return {
      restrict : 'EA',
      scope : {
        assessmentId : '='
      },
      templateUrl :'assessment/assessment.tpl.html',
      controller : 'atAssessmentCtrl',
      transclude : true
    }
  }

  function atAssessmentProvider(){

    var options = {
      baseUrl : 'localhost/'
    };

    this.config = function(param){
      angular.extend(options,param);
    };

    function Assessment($http){
      var assessment = {};

      assessment.current = {};

      assessment.load = function (assessmentId) {
        return $http.get(options.baseUrl + assessmentId).success(function (data) {
          assessment.current = data;
        });
      };

      return assessment;
    }

    this.$get = Assessment;
  }


  angular.module('at.assessment.editor',[
    'ui.ace',
    'at.assessment.submission'
  ]).directive('atAssessmentEditor',atAssessmentEditor)
    .controller('atAssessmentCtrl',atAssessmentCtrl)
    .provider('atAssessment',atAssessmentProvider);
})(angular);



{'fraction_non_alphanumeric': 0.14057507987220447, 'fraction_numerical': 0.0, 'mean_word_length': 2.9733502538071064, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '789361', 'n_tokens_mistral': 949, 'n_tokens_neox': 925, 'n_words': 133}