<commit_before>app.directive('connectIndividual', [
  "settings",
  "Course",
  "User",
  "$location",
  function(
    settings,
    Course,
    User,
    $location
  ) {
    return {
      templateUrl: settings.widgets + 'connect/individual.html',
      link: function(scope, element, attrs) {



        var url = $location.path().split(/[\s/]+/).pop();
        console.log(scope.user.first_name);

        Course.get({ url: url , _populate:"students"}, function(res){
          for (var i = 0; i < res[0].students.length; i++) {
            if(res[0].students[i].first_name == scope.user.first_name){
              showPicture(res[0].students[i]);
            }
          }
        });

        showPicture = function(user){
            var pic = ""
            if(user.profile_pic === undefined || user.profile_pic === ""){
              pic = "/img/profile_default.png";
            }else{
              pic = './uploads/' + user.profile_pic;
            }

            $(('.' + user._id)).css({
              'background' : 'url('+ pic + ')',
              '-webkit-background-size': 'contain',
              '-moz-background-size': 'contain',
              '-o-background-size': 'contain',
              'background-size': 'contain'
            })
        }

        element.hide();
        element.fadeIn(300);
      }
    };<commit_msg>small fix url<commit_after>app.directive('connectIndividual', [
  "settings",
  "Course",
  "User",
  "$location",
  function(
    settings,
    Course,
    User,
    $location
  ) {
    return {
      templateUrl: settings.widgets + 'connect/individual.html',
      link: function(scope, element, attrs) {



        var url = $location.path().split(/[\s/]+/)[2];

        Course.get({ url: url , _populate:"students"}, function(res){
          for (var i = 0; i < res[0].students.length; i++) {
            if(res[0].students[i].first_name == scope.user.first_name){
              showPicture(res[0].students[i]);
            }
          }
        });

        showPicture = function(user){
            var pic = ""
            if(user.profile_pic === undefined || user.profile_pic === ""){
              pic = "/img/profile_default.png";
            }else{
              pic = './uploads/' + user.profile_pic;
            }

            $(('.' + user._id)).css({
              'background' : 'url('+ pic + ')',
              '-webkit-background-size': 'contain',
              '-moz-background-size': 'contain',
              '-o-background-size': 'contain',
              'background-size': 'contain'
            })
        }

        element.hide();
        element.fadeIn(300);
      }
    };
{'fraction_non_alphanumeric': 0.1744230041619372, 'fraction_numerical': 0.0056753688989784334, 'mean_word_length': 1.6869918699186992, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6867773', 'n_tokens_mistral': 817, 'n_tokens_neox': 778, 'n_words': 129}