Commits

Udi Bauman committed d62ccd0

fixed bug when tutorial keeps showing

Comments (0)

Files changed (1)

 		var user = Meteor.user();
 		if (user.contextId) Session.set("contextId", user.contextId);
 	}
-	
+
     var _id = context.params._id;
 	if (!Session.equals("mapId", _id)) {
 		Session.set("mapId", _id);
 		    Session.set("selectedStory", null);
 		}
 	}
-	
+
 	Session.set("content_side_bar_shown", false);
 
 	// TODO record achievement
 				onenterstate: function(event, from, to) {
 				},
 				onStarted: function(event, from, to) {
-					if (!userNeedsTutorial("MASTERS_BASICS")) {
+					if (!userNeedsTutorial("MASTERS_BASICS") || Session.get("basics_tutorial_completed")) {
 						Session.set("show_tutorial_tip", false);
 						return;
 					}
 				onTutorialFinished: function(event, from, to) {
 					console.log(to);
 					Meteor.call("addUserBadge", "MASTERS_BASICS");
+					Session.set("basics_tutorial_completed", true);
 				}
 			}
 		});
   // svgPanFactory($);
   //$(".editabl).aloha();
 });
-
-
-
-
-
-
-
-
-