diff --git a/Dockerfile b/Dockerfile
index 2106e3e..b9082a9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,8 +14,6 @@ COPY . /src
WORKDIR /src
-RUN npm install
-
#node inspector port
EXPOSE 9000
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6775ebd
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# userrecstudy
+Recommended System User Study Mini Project
diff --git a/client/app/result/result.controller.js b/client/app/result/result.controller.js
index 5642586..c62c5c4 100644
--- a/client/app/result/result.controller.js
+++ b/client/app/result/result.controller.js
@@ -10,25 +10,50 @@ angular.module('recuserstudyApp')
$scope.withoutImagesUsers = [1,1,1,1,1,1,1];
$scope.totalUsers = [1,1,1,1,1,1,1];
- $http.get('/api/movies/getStats')
- .success(function (res) {
- $scope.stats = res;
- $scope.totalRecommendations = [res.users.chosen, res.users.amount - res.users.chosen];
- $scope.withImages = [res.withImages.chosen, res.withImages.amount - res.withImages.chosen];
- $scope.withoutImages = [res.withoutImages.chosen, res.withoutImages.amount - res.withoutImages.chosen];
- $scope.withImagesUsers = [res.withImages["15-25"], res.withImages["26-35"], res.withImages["36-45"], res.withImages["46-55"], res.withImages["56-65"], res.withImages["66-75"], res.withImages["76-85"]];
- $scope.withoutImagesUsers = [res.withoutImages["15-25"], res.withoutImages["26-35"], res.withoutImages["36-45"], res.withoutImages["46-55"], res.withoutImages["56-65"], res.withoutImages["66-75"], res.withoutImages["76-85"]];
- $scope.totalUsers = [res.users["15-25"], res.users["26-35"], res.users["36-45"], res.users["46-55"], res.users["56-65"], res.users["66-75"], res.users["76-85"]];
- $scope.loading = false;
- })
- .error(function(err){
- Modal.confirm.info(function () {
- $scope.loading = false;
- })("Error", err, "Ok");
- });
-
$scope.labels1 = ["chose a recommendation", "did not choose a recommendation"];
$scope.labels2 = ["15-25", "26-35", "36-45", "46-55", "56-65", "66-75", "76-85"];
$scope.colors = ['#FD1F5E','#1EF9A1'];
+ $scope.initial = function() {
+ $http.get('/api/movies/getStats')
+ .then(function (res) {
+ res = res.data;
+ $scope.stats = res;
+ $scope.totalRecommendations = [res.users.chosen, res.users.amount - res.users.chosen];
+ $scope.withImages = [res.withImages.chosen, res.withImages.amount - res.withImages.chosen];
+ $scope.withoutImages = [res.withoutImages.chosen, res.withoutImages.amount - res.withoutImages.chosen];
+ $scope.withImagesUsers = [res.withImages["15-25"], res.withImages["26-35"], res.withImages["36-45"], res.withImages["46-55"], res.withImages["56-65"], res.withImages["66-75"], res.withImages["76-85"]];
+ $scope.withoutImagesUsers = [res.withoutImages["15-25"], res.withoutImages["26-35"], res.withoutImages["36-45"], res.withoutImages["46-55"], res.withoutImages["56-65"], res.withoutImages["66-75"], res.withoutImages["76-85"]];
+ $scope.totalUsers = [res.users["15-25"], res.users["26-35"], res.users["36-45"], res.users["46-55"], res.users["56-65"], res.users["66-75"], res.users["76-85"]];
+ })
+ .then(function(){
+ return $http.get('api/movies/getUsers')
+ })
+ .then(function(res){
+ $scope.users = res.data;
+ $scope.loading = false;
+ })
+ .catch(function(err){
+ Modal.confirm.info(function () {
+ $scope.loading = false;
+ })("Error", err, "Ok");
+ });
+ };
+
+ $scope.deleteAll = function() {
+ $scope.loading = true;
+
+ $http.post('/api/movies/deleteAll')
+ .then(function(){
+ $scope.initial();
+ })
+ .catch(function(err){
+ Modal.confirm.info(function () {
+ $scope.loading = false;
+ })("Error", err, "Ok");
+ })
+ };
+
+ $scope.initial();
+
});
diff --git a/client/app/result/result.html b/client/app/result/result.html
index 58d76d6..7695b13 100644
--- a/client/app/result/result.html
+++ b/client/app/result/result.html
@@ -56,6 +56,30 @@
Total recommendations viewed by participants: {{stats.withoutImages.amount}}
+
+
+
+
+
+
+ BGU user |
+ Date |
+
+
+
+
+ {{user.bgu}} |
+ {{user.date}} |
+
+
+
+
+
+
+
+
+
+
diff --git a/client/app/step1/step1.html b/client/app/step1/step1.html
index 0d5be7e..c67e77a 100644
--- a/client/app/step1/step1.html
+++ b/client/app/step1/step1.html
@@ -3,7 +3,7 @@
Please pick your favorite movies from the following list by clicking on them
Please choose {{10 - userMovies.length}} more movies that you like
-
+
diff --git a/client/assets/images/rec/Apollo 13.jpg b/client/assets/images/rec/Apollo 13.jpg
index 3d91972..8a07be1 100644
Binary files a/client/assets/images/rec/Apollo 13.jpg and b/client/assets/images/rec/Apollo 13.jpg differ
diff --git a/client/assets/images/rec/Bridget Jones.jpg b/client/assets/images/rec/Bridget Jones.jpg
index 913b7d6..4b43c45 100644
Binary files a/client/assets/images/rec/Bridget Jones.jpg and b/client/assets/images/rec/Bridget Jones.jpg differ
diff --git a/client/assets/images/rec/Escape from New York.jpg b/client/assets/images/rec/Escape from New York.jpg
new file mode 100644
index 0000000..c4834e6
Binary files /dev/null and b/client/assets/images/rec/Escape from New York.jpg differ
diff --git a/client/assets/images/rec/Home.jpg b/client/assets/images/rec/Home.jpg
new file mode 100644
index 0000000..874b429
Binary files /dev/null and b/client/assets/images/rec/Home.jpg differ
diff --git a/client/assets/images/rec/John Carter.jpg b/client/assets/images/rec/John Carter.jpg
new file mode 100644
index 0000000..72e1943
Binary files /dev/null and b/client/assets/images/rec/John Carter.jpg differ
diff --git a/client/assets/images/rec/Master and Commander.jpg b/client/assets/images/rec/Master and Commander.jpg
new file mode 100644
index 0000000..50cd8bb
Binary files /dev/null and b/client/assets/images/rec/Master and Commander.jpg differ
diff --git a/client/assets/images/rec/San Andreas.jpg b/client/assets/images/rec/San Andreas.jpg
new file mode 100644
index 0000000..7df8f68
Binary files /dev/null and b/client/assets/images/rec/San Andreas.jpg differ
diff --git a/client/components/modal/form.html b/client/components/modal/form.html
index 3421aab..5e65fdd 100644
--- a/client/components/modal/form.html
+++ b/client/components/modal/form.html
@@ -17,13 +17,13 @@
Your age:
BGU user:
diff --git a/client/components/modal/modal.service.js b/client/components/modal/modal.service.js
index 553cbae..ea1a9f4 100644
--- a/client/components/modal/modal.service.js
+++ b/client/components/modal/modal.service.js
@@ -61,7 +61,7 @@ angular.module('recuserstudyApp')
text: continueText,
click: function(e) {
deleteModal.dismiss(e);
- del.apply(event, args);
+ del.apply(e, args);
}
}]
}
@@ -96,12 +96,12 @@ angular.module('recuserstudyApp')
buttons: [{
classes: 'btn-primary',
text: continueText,
- click: function(e, age, gender, bgu) {
+ click: function(e, age, gender, user, bgu) {
Movies.age = age;
Movies.gender = gender;
Movies.bgu = bgu;
deleteModal.dismiss(e);
- del.apply(event, args);
+ del.apply(e, args);
}
}]
}
@@ -135,7 +135,7 @@ angular.module('recuserstudyApp')
text: continueText,
click: function(e) {
deleteModal.dismiss(e);
- del.apply(event, args);
+ del.apply(e, args);
}
},
{
diff --git a/client/components/movies/movies.service.js b/client/components/movies/movies.service.js
index 8a0f454..b006cca 100644
--- a/client/components/movies/movies.service.js
+++ b/client/components/movies/movies.service.js
@@ -303,7 +303,7 @@ angular.module('recuserstudyApp')
actors: " Steve Carell, Kristen Wiig, Benjamin Bratt",
description: "When Gru, the world's most super-bad turned super-dad has been recruited by a team of officials to stop lethal muscle and a host of Gru's own, He has to fight back with new gadgetry, cars, and more minion madness.",
image: "assets/images/all/23.jpg",
- recommend: [16,38,60,170]
+ recommend: [16,38,176,170]
},
"23": {
name: "Finding Nemo",
@@ -698,7 +698,7 @@ angular.module('recuserstudyApp')
country: "USA",
length: 117,
category: "Biography, Drama",
- director: "Jean-Marc Vallée",
+ director: "Jean-Marc Valle",
actors: "Matthew McConaughey, Jennifer Garner, Jared Leto",
description: "In 1985 Dallas, electrician and hustler Ron Woodroof works around the system to help AIDS patients get the medication they need after he is himself diagnosed with the disease.",
image: "assets/images/rec/MV5BMTYwMTA4MzgyNF5BMl5BanBnXkFtZTgwMjEyMjE0MDE@._V1_SX214_AL_.jpg"
@@ -740,28 +740,28 @@ angular.module('recuserstudyApp')
image: "assets/images/rec/MV5BMTU4MDU3NDQ5Ml5BMl5BanBnXkFtZTgwOTU5MDUxNTE@._V1_SY317_CR1,0,214,317_AL_.jpg"
},
"11": {
- name: "Mad Max Beyond Thunderdome",
- year: "1985",
- datePublished: "10 July 1985",
- country: "USA",
- length: 107,
- category: "Action, Adventure, Sci-Fi ",
- director: "George Miller, George Ogilvie",
- actors: "Mel Gibson, Tina Turner, Bruce Spence",
- description: "A former Australian policeman is rescued by a tribe of children when he is banished from a desert town and sent into the desert to die by the desert town's evil queen.",
- image: "assets/images/rec/MV5BMTk0MDQ5NTYxNV5BMl5BanBnXkFtZTcwNTA0ODYyMQ@@._V1_SY317_CR11,0,214,317_AL_.jpg"
+ name: "San Andreas",
+ year: "2015",
+ datePublished: "28 May 2015",
+ country: "USA, Australia",
+ length: 114,
+ category: "Action, Drama, Thriller",
+ director: "Brad Peyton",
+ actors: "Dwayne Johnson, Carla Gugino, Alexandra Daddario",
+ description: "In the aftermath of a massive earthquake in California, a rescue-chopper pilot makes a dangerous journey across the state in order to rescue his daughter.",
+ image: "assets/images/rec/San Andreas.jpg"
},
"12": {
- name: "Mad Max",
- year: "1979",
- datePublished: "12 April 1979",
- country: "Australia",
- length: 88,
- category: "Action, Adventure, Sci-Fi ",
- director: "George Miller",
- actors: "Mel Gibson, Joanne Samuel, Hugh Keays-Byrne",
- description: "In a self-destructing world, a vengeful Australian policeman sets out to stop a violent motorcycle gang.",
- image: "assets/images/rec/MV5BMTM4Mjg5ODEzMV5BMl5BanBnXkFtZTcwMDc3NDk0NA@@._V1_SX214_AL_.jpg"
+ name: "Escape from New York",
+ year: "1981",
+ datePublished: "10 July 1981",
+ country: "UK, USA",
+ length: 99,
+ category: "Action, Sci-Fi",
+ director: "John Carpenter",
+ actors: "Kurt Russell, Lee Van Cleef, Ernest Borgnine",
+ description: "In 1997, when the US President crashes into Manhattan, now a giant maximum security prison, a convicted bank robber is sent in for a rescue.",
+ image: "assets/images/rec/Escape from New York.jpg"
},
"13": {
name: "Tomorrowland",
@@ -1394,7 +1394,7 @@ angular.module('recuserstudyApp')
country: "USA",
length: 117,
category: "Animation, Adventure, Comedy",
- director: "Samuel L. Jackson, Holly Hunter",
+ director: " John Lasseter, Joe Ranft",
actors: "Owen Wilson, Bonnie Hunt, Paul Newman",
description: "A hot-shot race-car named Lightning McQueen gets waylaid in Radiator Springs, where he finds the true meaning of friendship and family.",
image: "assets/images/rec/Cars.jpg"
@@ -1406,7 +1406,7 @@ angular.module('recuserstudyApp')
country: "USA",
length: 111,
category: "Animation, Comedy, Family",
- director: "Samuel L. Jackson, Holly Hunter",
+ director: "Brad Bird, Jan Pinkava",
actors: "Brad Garrett, Lou Romano, Patton Oswalt",
description: "A rat who can cook makes an unusual alliance with a young kitchen worker at a famous restaurant.",
image: "assets/images/rec/Ratatouille.jpg"
@@ -1433,7 +1433,7 @@ angular.module('recuserstudyApp')
director: "Matthew Vaughn",
actors: "Colin Firth, Taron Egerton, Samuel L. Jackson",
description: "A spy organization recruits an unrefined, but promising street kid into the agency's ultra-competitive training program, just as a global threat emerges from a twisted tech genius.",
- image: "assets/images/rec/Kingsman: The Secret Service.jpg"
+ image: "assets/images/rec/Kingsman.jpg"
},
"69": {
name: "The Little Mermaid",
@@ -1520,16 +1520,16 @@ angular.module('recuserstudyApp')
image: "assets/images/rec/Wreck-It Ralph.jpg"
},
"76": {
- name: "Troy",
- year: "2004",
- datePublished: "19 May 2004",
- country: "USA, Malta",
- length: 163,
- category: "Adventure",
- director: "Wolfgang Petersen",
- actors: "Brad Pitt, Eric Bana, Orlando Bloom",
- description: "An adaptation of Homer's great epic, the film follows the assault on Troy by the united Greek forces and chronicles the fates of the men involved.",
- image: "assets/images/rec/Troy.jpg"
+ name: "Master and Commander: The Far Side of the World",
+ year: "2003",
+ datePublished: "27 November 2003",
+ country: "USA",
+ length: 138,
+ category: "Action, Adventure, Drama",
+ director: "Peter Weir",
+ actors: "Russell Crowe, Paul Bettany, Billy Boyd",
+ description: "During the Napoleonic Wars, a brash British captain pushes his ship and crew to their limits in pursuit of a formidable French war vessel around South America.",
+ image: "assets/images/rec/Master and Commander.jpg"
},
"77": {
name: "The Departed",
@@ -1694,7 +1694,7 @@ angular.module('recuserstudyApp')
country: "USA",
length: 92,
category: "Animation, Action, Adventure",
- director: "Angelina Jolie, Jackie Chan",
+ director: "Mark Osborne, John Stevenson",
actors: "Jack Black, Ian McShane, Angelina Jolie",
description: "In the Valley of Peace, Po the Panda finds himself chosen as the Dragon Warrior despite the fact that he is obese and a complete novice at martial arts.",
image: "assets/images/rec/Kung Fu Panda.jpg"
@@ -1792,7 +1792,7 @@ angular.module('recuserstudyApp')
category: "Biography, Drama, History",
director: "Ava DuVernay",
actors: "David Oyelowo, Carmen Ejogo, Tim Roth",
- description: "A chronicle of ",
+ description: "A chronicle of Martin Luther King's campaign to secure equal voting rights via an epic march from Selma to Montgomery, Alabama in 1965.",
image: "assets/images/rec/Selma.jpg"
},
"99": {
@@ -1817,7 +1817,7 @@ angular.module('recuserstudyApp')
director: "Beeban Kidron",
actors: "Rene Zellweger, Colin Firth, Hugh Grant",
description: "After finding love, Bridget Jones questions if she really has everything she's dreamed of having.",
- image: "assets/images/rec/Bridget Jones: The Edge of Reason.jpg"
+ image: "assets/images/rec/Bridget Jones.jpg"
},
"101": {
name: "13 Going on 30",
@@ -1973,7 +1973,7 @@ angular.module('recuserstudyApp')
director: "John Wells",
actors: "Meryl Streep, Dermot Mulroney, Julia Roberts",
description: "A look at the lives of the strong-willed women of the Weston family, whose paths have diverged until a family crisis brings them back to the Oklahoma house they grew up in, and to the dysfunctional woman who raised them.",
- image: "assets/images/rec/August: Osage County.jpg"
+ image: "assets/images/rec/August.jpg"
},
"114": {
name: "Fury",
@@ -2128,7 +2128,7 @@ angular.module('recuserstudyApp')
category: "Biography, Comedy, Drama",
director: "John Lee Hancock",
actors: "Emma Thompson, Tom Hanks, Annie Rose Buckley",
- description: "Author ",
+ description: "Author P.L. Travers reflects on her childhood after reluctantly meeting with Walt Disney, who seeks to adapt her Mary Poppins books for the big screen.",
image: "assets/images/rec/Saving Mr. Banks.jpg"
},
"127": {
@@ -2330,7 +2330,7 @@ angular.module('recuserstudyApp')
country: "USA, UK",
length: 127,
category: "Action, Adventure, Sci-Fi",
- director: "Julianne Moore, Jeff Bridges",
+ director: " Andy Wachowski, Lana Wachowski",
actors: "Channing Tatum, Mila Kunis, Eddie Redmayne",
description: "A young woman discovers her destiny as an heiress of intergalactic nobility and must fight to protect the inhabitants of Earth from an ancient and destructive industry.",
image: "assets/images/rec/Jupiter Ascending.jpg"
@@ -2366,7 +2366,7 @@ angular.module('recuserstudyApp')
country: "USA, Argentina",
length: 105,
category: "Comedy, Crime, Drama",
- director: "Dev Patel, Hugh Jackman",
+ director: "Glenn Ficarra, John Requa",
actors: "Will Smith, Margot Robbie, Rodrigo Santoro",
description: "In the midst of veteran con man Nicky's latest scheme, a woman from his past - now an accomplished femme fatale - shows up and throws his plans for a loop.",
image: "assets/images/rec/Focus.jpg"
@@ -2564,16 +2564,16 @@ angular.module('recuserstudyApp')
image: "assets/images/rec/Big Hero 6.jpg"
},
"162": {
- name: "Iron Man",
- year: "2008",
- datePublished: "1 May 2008",
+ name: "John Carter",
+ year: "2012",
+ datePublished: "8 March 2012",
country: "USA",
- length: 126,
- category: "Action, Adventure, Sci-Fi",
- director: "Jon Favreau",
- actors: "Robert Downey Jr., Gwyneth Paltrow, Terrence Howard",
- description: "After being held captive in an Afghan cave, an industrialist creates a unique weaponized suit of armor to fight evil.",
- image: "assets/images/rec/Iron Man.jpg"
+ length: 132,
+ category: "Action, Adventure, Fantasy",
+ director: "Andrew Stanton",
+ actors: "Taylor Kitsch, Lynn Collins, Willem Dafoe",
+ description: "Transported to Barsoom, a Civil War vet discovers a barren planet seemingly inhabited by 12-foot tall barbarians. Finding himself prisoner of these creatures, he escapes, only to encounter Woola and a princess in desperate need of a savior.",
+ image: "assets/images/rec/John Carter.jpg"
},
"163": {
name: "Apollo 13",
@@ -2730,6 +2730,18 @@ angular.module('recuserstudyApp')
actors: "Mel Gibson, Heath Ledger, Joely Richardson",
description: "Peaceful farmer Benjamin Martin is driven to lead the Colonial Militia during the American Revolution when a sadistic British officer murders his son.",
image: "assets/images/rec/The Patriot.jpg"
+ },
+ "176": {
+ name: "Home",
+ year: "2015",
+ datePublished: "26 March 2015",
+ country: "USA",
+ length: 94,
+ category: "Animation, Adventure, Comedy",
+ director: "Tim Johnson",
+ actors: "Jim Parsons, Rihanna, Steve Martin",
+ description: "Oh, an alien on the run from his own people, lands on Earth and makes friends with the adventurous Tip, who is on a quest of her own.",
+ image: "assets/images/rec/Home.jpg"
}
};
diff --git a/npm-debug.log b/npm-debug.log
index 7a259af..9588465 100644
--- a/npm-debug.log
+++ b/npm-debug.log
@@ -76,6 +76,7 @@
6 info preinstall recuserstudy@0.0.0
7 silly cache add args [ 'body-parser@~1.5.0', null ]
8 verbose cache add spec body-parser@~1.5.0
+asd
9 silly cache add parsed spec { raw: 'body-parser@~1.5.0',
9 silly cache add scope: null,
9 silly cache add name: 'body-parser',
diff --git a/server/api/movie/index.js b/server/api/movie/index.js
index 318304f..5488079 100644
--- a/server/api/movie/index.js
+++ b/server/api/movie/index.js
@@ -12,3 +12,6 @@ router.post('/deleteAll', controller.deleteAll);
router.post('/saveUserExperiment', controller.saveUserExperiment);
module.exports = router;
+
+
+
diff --git a/server/api/movie/movie.controller.js b/server/api/movie/movie.controller.js
index 1e7df5f..42e9157 100644
--- a/server/api/movie/movie.controller.js
+++ b/server/api/movie/movie.controller.js
@@ -63,7 +63,7 @@ exports.getUsers = function (request, response){
exports.deleteAll = function(request, response){
- Movies.delete(function(err){
+ Movie.remove({}, function(err){
if (err){
return response.send(400, "An error occurred while trying to delete data from system. We are sorry.");
}