admin: Continue refactoring of exercice view
This commit is contained in:
parent
06dcd0c2b7
commit
1c09ae2fa8
2 changed files with 40 additions and 26 deletions
|
@ -1023,6 +1023,26 @@ angular.module("FICApp")
|
|||
$scope.exercices = Exercice.query();
|
||||
$scope.fields = ["title", "urlid", "statement", "overview", "depend", "gain", "coefficient", "videoURI"];
|
||||
|
||||
$scope.showDownloads = false;
|
||||
$scope.toggleDownloads = function(val) {
|
||||
$scope.showDownloads = val ||!$scope.showDownloads;
|
||||
}
|
||||
|
||||
$scope.showHints = false;
|
||||
$scope.toggleHints = function(val) {
|
||||
$scope.showHints = val || !$scope.showHints;
|
||||
}
|
||||
|
||||
$scope.showFlags = false;
|
||||
$scope.toggleFlags = function(val) {
|
||||
$scope.showFlags = val || !$scope.showFlags;
|
||||
}
|
||||
|
||||
$scope.showQuizz = false;
|
||||
$scope.toggleQuizz = function(val) {
|
||||
$scope.showQuizz = val || !$scope.showQuizz;
|
||||
}
|
||||
|
||||
$scope.saveExercice = function() {
|
||||
if (this.exercice.id) {
|
||||
this.exercice.$update();
|
||||
|
@ -1070,6 +1090,7 @@ angular.module("FICApp")
|
|||
$scope.hints = ExerciceHint.query({ exerciceId: $routeParams.exerciceId });
|
||||
|
||||
$scope.addHint = function() {
|
||||
$scope.toggleHints(true);
|
||||
$scope.hints.push(new ExerciceHint());
|
||||
}
|
||||
$scope.deleteHint = function() {
|
||||
|
@ -1110,6 +1131,7 @@ angular.module("FICApp")
|
|||
$scope.flags = ExerciceFlag.query({ exerciceId: $routeParams.exerciceId });
|
||||
|
||||
$scope.addFlag = function() {
|
||||
$scope.toggleFlags(true);
|
||||
$scope.flags.push(new ExerciceFlag());
|
||||
}
|
||||
$scope.deleteFlag = function() {
|
||||
|
@ -1150,6 +1172,7 @@ angular.module("FICApp")
|
|||
$scope.quiz = ExerciceMCQFlag.query({ exerciceId: $routeParams.exerciceId });
|
||||
|
||||
$scope.addQuiz = function() {
|
||||
$scope.toggleQuizz(true);
|
||||
$scope.quiz.push(new ExerciceMCQFlag());
|
||||
}
|
||||
$scope.deleteQuiz = function() {
|
||||
|
|
Reference in a new issue