Skip to content

Instantly share code, notes, and snippets.

@arya-oss
Created November 28, 2016 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arya-oss/1c26eedb25e0118772db14083abb9c4d to your computer and use it in GitHub Desktop.
Save arya-oss/1c26eedb25e0118772db14083abb9c4d to your computer and use it in GitHub Desktop.
$rating = 4;
$courseNumber = 1;
/* Author: Aneesh Makala
* Course Number starts from 0 to no. of courses
* Click on course feedback and then select a subject
* Open Dev Tools and goto COnsole Tab and Paste this script
*/
$scope = angular.element('[ng-controller=feedbackCourses]').scope();
for($i = 0; $i< $scope.course[$courseNumber].question.course.length; $i++){
$scope.course[$courseNumber].question.course[$i].display = true;
$scope.course[$courseNumber].question.course[$i].value = $rating;
}
for($i = 0; $i< $scope.course[$courseNumber].question.faculty.length; $i++){
$scope.course[$courseNumber].question.faculty[$i].display = true;
$scope.course[$courseNumber].question.faculty[$i].value = $rating;
}
$scope.$apply();
$scope.submitFeedback();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment