--- a/ucs-school-umc-computerroom/umc/js/computerroom.js +++ a/ucs-school-umc-computerroom/umc/js/computerroom.js @@ -929,7 +929,7 @@ define([ } // start finishing the exam - var info = this.get('roomInfo') || {}; + var info = lang.clone(this.get('roomInfo') || {}); this.umcpCommand('schoolexam/exam/finish', { exam: info.exam, room: info.room @@ -944,6 +944,10 @@ define([ deferred.resolve(); }); + // reset room settings (prior to finishing the exam!) + this._settingsDialog.reset(); + this._settingsDialog.save(); + // things to do after finishing the exam deferred.then(lang.hitch(this, function() { return this.umcpCommand('computerroom/exam/finish', { @@ -959,9 +963,6 @@ define([ delete info.examEndTime; this.set('roomInfo', info); - // reset room settings - this._settingsDialog.reset(); - this._settingsDialog.save(); } })); })); --- a/ucs-school-umc-computerroom/umc/python/computerroom/__init__.py +++ a/ucs-school-umc-computerroom/umc/python/computerroom/__init__.py @@ -774,11 +778,10 @@ def settings_set(self, printMode, internetRule, shareMode, period=None, customRu ucr.load() if not ucr.get(varname): vset[varname] = '""' + vunset.append(varname) else: # remove empty items ('""') in list vset[varname] = ' '.join([x for x in vset[varname].split(' ') if x != '""']) - if varname in vunset: - del vunset[varname] # set values ucr_vars = sorted('%s=%s' % x for x in vset.items())