frontend: add script to change frontend base URL

This commit is contained in:
nemunaire 2017-11-21 22:49:53 +01:00 committed by Pierre-Olivier Mercier
parent 76a4c09f37
commit b31f009d2e
2 changed files with 46 additions and 12 deletions

View file

@ -172,13 +172,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
$scope.hsubmit = function(hint) {
hint.submitted = true;
$http({
url: "/openhint/" + $rootScope.current_exercice,
method: "POST",
data: {
id: hint.id
}
}).success(function(data, status, header, config) {
$http({ url: "/openhint/" + $rootScope.current_exercice, method: "POST", data: { id: hint.id } }).success(function(data, status, header, config) {
var checkDiffHint = function() {
$http.get("/my.json").success(function(my) {
angular.forEach(my.exercices[$rootScope.current_exercice].hints, function(h,hid){
@ -231,11 +225,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
flgs[flag.name] = flag.value;
});
$http({
url: "/submit/" + $rootScope.current_exercice,
method: "POST",
data: flgs
}).success(function(data, status, header, config) {
$http({ url: "/submit/" + $rootScope.current_exercice, method: "POST", data: flgs }).success(function(data, status, header, config) {
$rootScope.messageClass = {"text-success": true};
$rootScope.message = data.errmsg;
$rootScope.sberr = "";