Hide new to-do list checkboxes from instructors

millerjm
Community Champion
0
1225

We were initially told that the new "Add to Student To-Do List" checkboxes/functionality available to instructors in the latest release notes would be behind a feature flag, but it's not.  Until we can get some training out to faculty for the best way to use this new feature, I added some code our CSS and JS files to hide that option from instructors.  I'm not an expert at JS or CSS so there may be a better way of doing this but this works.  Smiley Happy

JS code:  

if ((window.location.href.indexOf("pages") > 0 )) 
{

$("#student_planner_checkbox").closest('div').hide();
$("#todo_date_container").closest('div').hide();
$("#student_planner_checkbox").hide();
$("#todo_date_container").hide()
}

if ((window.location.href.indexOf("discussion_topics") > 0 ))
{

$("#allow_todo_date").closest('div').hide();
$("#todo_date_input").closest('div').hide();
$("#allow_todo_date").hide();
$("#todo_date_input").hide()
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
}

CSS Code:  

label[for~=student_planner_checkbox] {

  display: none;
}

input[name~=student_planner_checkbox] {

  display: none;
}

label[for~=allow_todo_date] {

  display: none;
}

input[name~=allow_todo_date] {

  display: none;
}

We'll remove this once we get some best practices out to faculty but we would rather not roll out new functionality on the weekend before fall term starts while faculty are preparing their courses.  Hope this helps someone else.