Template.signupGap.onCreated(function() {
  var self = this;
  this.timeRemaining = new ReactiveVar(0);

  this.autorun(function() {
    if(this.interval)
      Meteor.clearInterval(this.interval);

    var nextSignupTime = _nextSignupTime(Meteor.userId(), Template.currentData()._id);
    if (nextSignupTime === null) return;

    this.interval = Meteor.setInterval(function() {
      self.timeRemaining.set(nextSignupTime - Date.now());
    }, 1000);
  });
});

Template.signupGap.helpers({
  showMessage: function() {
    var timeRemaining = Template.instance().timeRemaining.get();
    var signupGap = Courses.findOne({name: this.course}).settings.signupGap || 0;

    var show = (this.status !== "ended"
      && timeRemaining < signupGap
      && timeRemaining > 0);

    // TODO: Come up with a cleaner way to do this?
    // Perhaps with a reactive variable that lives within the scope of queueList?
    var $joinButton = $(".js-show-join-queue");
    if (show) {
      $joinButton.addClass("disabled");
    } else {
      $joinButton.removeClass("disabled");
    }

    return show;
  },

  timeRemaining: function() {
    var ms = Template.instance().timeRemaining.get();
    var s = ms / 1000.0;
    if (s < 60) {
      return Math.floor(s) + " seconds";
    } else {
      var mins = Math.floor(s / 60);
      return mins + " minutes, " + Math.floor(s - mins * 60) + " seconds";
    }
  }
});

Template.signupGap.onDestroyed(function() {
  Meteor.clearInterval(this.interval);
});

@@ -56,20 +56,59 @@
 this;%0A  
-this
+self.signupGap = new ReactiveVar(0);%0A  self
 .timeRem
@@ -139,20 +139,20 @@
 (0);%0A%0A  
-this
+self
 .autorun
@@ -173,15 +173,254 @@
     
-if(this
+// Reactively update signupGap%0A    var signupGap = Courses.findOne(%7Bname: Template.currentData().course%7D).settings.signupGap %7C%7C 0%0A    self.signupGap.set(signupGap);%0A%0A    // Reactively update the timeRemaining for user to sign up again%0A    if(self
 .int
@@ -445,36 +445,36 @@
 r.clearInterval(
-this
+self
 .interval);%0A%0A   
@@ -603,20 +603,20 @@
 n;%0A%0A    
-this
+self
 .interva
@@ -881,53 +881,27 @@
 p = 
-Courses.findOne(%7Bname: this.course%7D).settings
+Template.instance()
 .sig
@@ -906,21 +906,22 @@
 ignupGap
- %7C%7C 0
+.get()
 ;%0A%0A    v

Update student-side gap reactively with settings update