always show student module progression button to teachers
fixes #9351 test plan: as a student visit the course modules page, verify that the "view student progress" button doesn't appear. as a teacher visit the page and verify the button appears, even if no students have started progression through the modules yet, or if all students have finished all modules. Change-Id: I0fab645fb7302b90fe46b8c72950889418f1933d Reviewed-on: https://gerrit.instructure.com/12079 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com>
This commit is contained in:
parent
7290ff6470
commit
9a121c89b1
|
@ -98,7 +98,6 @@ define([
|
|||
var $user_progression_list = $("#current_user_progression_list");
|
||||
var $student_progression_list = $("#progression_list");
|
||||
var lists_per_user = {};
|
||||
var any_locked = false;
|
||||
var progressions = [];
|
||||
for(var idx in data) {
|
||||
progressions.push(data[idx]);
|
||||
|
@ -109,7 +108,7 @@ define([
|
|||
modules.updateProgressionState($(this));
|
||||
});
|
||||
}
|
||||
modules.refreshProgressions(any_locked && !user_id);
|
||||
modules.refreshProgressions(!user_id);
|
||||
if(callback) { callback(); }
|
||||
}
|
||||
var progressionCnt = 0;
|
||||
|
@ -120,9 +119,6 @@ define([
|
|||
return;
|
||||
}
|
||||
var progression = data.context_module_progression;
|
||||
if(progression.workflow_state == "locked") {
|
||||
any_locked = true;
|
||||
}
|
||||
if(progression.user_id == current_user_id) {
|
||||
var $user_progression = $user_progression_list.find(".progression_" + progression.context_module_id)
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ describe "context_modules" do
|
|||
|
||||
it "should add a module" do
|
||||
add_module('New Module')
|
||||
# should always show the student progressions button for teachers
|
||||
f('.module_progressions_link').should be_displayed
|
||||
end
|
||||
|
||||
it "should delete a module" do
|
||||
|
|
|
@ -57,6 +57,9 @@ describe "context_modules" do
|
|||
it "should validate that course modules show up correctly" do
|
||||
go_to_modules
|
||||
|
||||
# shouldn't show the teacher's "show student progression" button
|
||||
ff('.module_progressions_link').should_not be_present
|
||||
|
||||
context_modules = driver.find_elements(:css, '.context_module')
|
||||
#initial check to make sure everything was setup correctly
|
||||
validate_context_module_status_text(0, IN_PROGRESS_TEXT)
|
||||
|
@ -191,4 +194,4 @@ describe "context_modules" do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue