From 4fe696f5442a87e99863a40c5a32fc2a226c8a35 Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Thu, 28 May 2015 10:52:25 -0400 Subject: [PATCH 001/101] made script more robust. --- bin/startDancer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/startDancer b/bin/startDancer index de1e2ca9fa..6f7e8bde3b 100755 --- a/bin/startDancer +++ b/bin/startDancer @@ -1,3 +1,3 @@ #!/bin/sh -perl -I /opt/webwork/webwork2/lib -I /opt/webwork/pg/lib /opt/webwork/webwork2/webwork3/bin/app.pl \ No newline at end of file +perl -I $WEBWORK_ROOT/lib -I $WEBWORK_ROOT/../pg/lib $WEBWORK_ROOT/webwork3/bin/app.pl \ No newline at end of file From 377a286b41eae94b967985aa07386a33113e70fe Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Thu, 28 May 2015 10:53:45 -0400 Subject: [PATCH 002/101] Added coloring to customized date/times for users that don't have the same date/times as the regular problem set dates. --- .../apps/CourseManager/main-views/ProblemSetDetailView.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js index d126d75b3c..5044f17540 100644 --- a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js +++ b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js @@ -450,6 +450,12 @@ var AssignUsersView = Backbone.View.extend({ els: this.$(".open-date,.due-date,.reduced-scoring-date,.answer-date")}) this.userSetTable.refreshTable(); this.stickit(); + // color the changed dates blue + _([".open-date",".due-date",".reduced-scoring-date",".answer-date"]).each(function(date){ + var val = $("#customize-problem-set-controls " + date + " .wwdate").val() + $(date +" .wwdate").filter(function(i,v) {return $(v).val()!=val;}).css("color","blue"); + }); + }, tableSetup: function () { var self = this; From 59aa0516cc6465f7029c3edd8bb4cea52230fcf3 Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Thu, 28 May 2015 11:25:37 -0400 Subject: [PATCH 003/101] Fixed issue where on ProblemSetDetails View that the customize users tab was reloading all the user data on a render (like resizing the window). --- .../apps/CourseManager/main-views/ProblemSetDetailView.js | 6 +----- webwork3/public/js/views/MainView.js | 2 +- webwork3/public/js/views/TabbedMainView.js | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js index 5044f17540..dc399e77ce 100644 --- a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js +++ b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js @@ -35,8 +35,7 @@ define(['backbone','underscore','views/TabbedMainView','views/MainView', 'views/ TabbedMainView.prototype.initialize.call(this,options); this.state.on("change:set_id", function() { self.changeProblemSet(self.state.get("set_id")); - }) - + }); }, bindings: { ".problem-set-name": {observe: "set_id", selectOptions: { @@ -49,9 +48,6 @@ define(['backbone','underscore','views/TabbedMainView','views/MainView', 'views/ render: function(){ TabbedMainView.prototype.render.call(this); this.stickit(this.state,this.bindings); - if(this.state.get("set_id")){ - this.changeProblemSet(this.state.get("set_id")); - } }, getHelpTemplate: function () { switch(this.state.get("tab_name")){ diff --git a/webwork3/public/js/views/MainView.js b/webwork3/public/js/views/MainView.js index 0a37284fd6..9975b4adbe 100644 --- a/webwork3/public/js/views/MainView.js +++ b/webwork3/public/js/views/MainView.js @@ -39,7 +39,7 @@ define(['backbone'],function(Backbone){ // the follow can be overridden if the state is not stored in a Backbone Model called this.state. setState: function (_state) { if(_state){ - this.state.set(_state,{silent: true}); + this.state.set(_state); } return this; }, diff --git a/webwork3/public/js/views/TabbedMainView.js b/webwork3/public/js/views/TabbedMainView.js index 09eaec4e21..8128b82543 100644 --- a/webwork3/public/js/views/TabbedMainView.js +++ b/webwork3/public/js/views/TabbedMainView.js @@ -73,7 +73,7 @@ define(['backbone','underscore','views/MainView'], MainView.prototype.setState.apply(this,[_state]); if(_state){ _(_state.tab_states).chain().keys().each(function(st){ - self.views[st].tabState.set(_state.tab_states[st],{silent: true}); + self.views[st].tabState.set(_state.tab_states[st]); }); } return this; From d5903cbf750b451204c169830d39e0caa74fc905 Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Thu, 28 May 2015 11:37:59 -0400 Subject: [PATCH 004/101] fixed a case where the coloring didn't work. --- .../js/apps/CourseManager/main-views/ProblemSetDetailView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js index dc399e77ce..f1ea7eaf2d 100644 --- a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js +++ b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js @@ -370,7 +370,7 @@ var AssignUsersView = Backbone.View.extend({ "selected-row-changed": function(rowIDs){ self.tabState.set({selected_rows: rowIDs}); }, - "table-sorted": function (){ + "table-sorted table-changed": function (){ self.update(); } }) From c8dd5b58454fcaf9530dde30578024d751c1c389 Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Thu, 28 May 2015 12:10:42 -0400 Subject: [PATCH 005/101] Moved the problem set properties to the top to make it clearer how to change the properties. Added the user data inside a scrolling table. --- webwork3/public/css/course-manager.css | 13 +++++++ .../main-views/ProblemSetDetailView.js | 5 +++ webwork3/views/main/problem_set_details.tt | 38 +++++++++++-------- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/webwork3/public/css/course-manager.css b/webwork3/public/css/course-manager.css index 3a198640c7..42a77062d6 100644 --- a/webwork3/public/css/course-manager.css +++ b/webwork3/public/css/course-manager.css @@ -101,6 +101,19 @@ border-radius: 5px;} border: 1px dashed black; background: lightgray; } +/* Problem Set Deatils styles */ + +.border-around-table { + border: 1px lightgray solid; + border-radius: 4px; + padding: 4px; + margin-bottom: 10px; +} + +#customize-problem-set-controls { + margin-bottom: 4px +} + /* Classlist Manager styles */ #man_student_table {border: 1px solid black; border-collapse: collapse; width: 95%; } diff --git a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js index f1ea7eaf2d..97484a5a63 100644 --- a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js +++ b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js @@ -451,6 +451,11 @@ var AssignUsersView = Backbone.View.extend({ var val = $("#customize-problem-set-controls " + date + " .wwdate").val() $(date +" .wwdate").filter(function(i,v) {return $(v).val()!=val;}).css("color","blue"); }); + var h = $(window).height()-($(".navbar-fixed-top").outerHeight(true) + $(".header-set-name").outerHeight(true)+ + $("#customize-problem-set-controls").parent().outerHeight()+ + $("#footer").outerHeight()); + console.log(h); + $("#student-override-container").height(h); }, tableSetup: function () { diff --git a/webwork3/views/main/problem_set_details.tt b/webwork3/views/main/problem_set_details.tt index 41922c2237..86732e262a 100644 --- a/webwork3/views/main/problem_set_details.tt +++ b/webwork3/views/main/problem_set_details.tt @@ -84,6 +84,27 @@ From e45e9d321204962ce4ea0ee43c39f612560374e1 Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Fri, 29 May 2015 12:24:29 -0400 Subject: [PATCH 012/101] Added number of problems to the Set Details subview --- .../js/apps/CourseManager/main-views/ProblemSetDetailView.js | 3 +++ webwork3/views/main/problem_set_details.tt | 1 + 2 files changed, 4 insertions(+) diff --git a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js index 022ce37ffe..c6e0f5a1c9 100644 --- a/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js +++ b/webwork3/public/js/apps/CourseManager/main-views/ProblemSetDetailView.js @@ -201,6 +201,9 @@ define(['backbone','underscore','views/TabbedMainView','views/MainView', 'views/ ".reduced-scoring": "enable_reduced_scoring", ".reduced-scoring-date": "reduced_scoring_date", ".hide-hint": "hide_hint", + ".num-problems": { observe: "problems", onGet:function(value,options) { + return value.length; + }}, ".users-assigned": { observe: "assigned_users", onGet: function(value, options){ return value.length + "/" +this.users.size();} diff --git a/webwork3/views/main/problem_set_details.tt b/webwork3/views/main/problem_set_details.tt index 516eb72c65..7b4dff9baf 100644 --- a/webwork3/views/main/problem_set_details.tt +++ b/webwork3/views/main/problem_set_details.tt @@ -181,6 +181,7 @@ Loading sets for users... Problem Set Visible to Users Reduced Scoring Enabled Hide Hints from Users +Number of Problems in Set Users Assigned