Commit 96eb99a5 by Robert Lyon

Bug 1639096: Fixing shared with group pagination

To test: 1) Create a group A and set it up to allow submissions 2) Get user A to make 12 pages and then share them with group A 3) Get user B to make 12 pages and then submit them all for assessment to Group A When we try to go to the next page for shared pages we get results for submissions as well. behatnotneeded Change-Id: I3df34b2a3c66e01affca9753a42237e849fc4a12 Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz> (cherry picked from commit f1b0580d)
parent 52abb658
......@@ -56,6 +56,7 @@ else {
// For group members, display a list of collections that others have
// shared to the group
$hidesubmitted = group_user_can_assess_submitted_views($groupid, $USER->get('id'));
if (empty($configdata['showsharedcollections'])) {
$sharedcollections = array(
'data' => array(),
......@@ -70,7 +71,8 @@ else {
$offset,
$groupid,
($configdata['showsharedcollections'] == 2 ? false : true),
$sortsharedcollectionsby
$sortsharedcollectionsby,
$hidesubmitted
);
}
......
......@@ -50,6 +50,7 @@ else {
// For group members, display a list of views that others have
// shared to the group
$hidesubmitted = group_user_can_assess_submitted_views($groupid, $USER->get('id'));
if (empty($configdata['showsharedviews'])) {
$sharedviews = array(
'data' => array(),
......@@ -64,7 +65,8 @@ else {
$offset,
$groupid,
($configdata['showsharedviews'] == 2 ? false : true),
$sortsharedviewsby
$sortsharedviewsby,
$hidesubmitted
);
foreach ($sharedviews['data'] as &$view) {
if (!$editing && isset($view['template']) && $view['template']) {
......
......@@ -55,15 +55,6 @@
<span class="lead text-small">{str tag=nosharedviewsyet section=view}</span>
</div>
{/if}
{if $sharedviews.pagination_js}
<script>
addLoadEvent(function() {literal}{{/literal}
{$sharedviews.pagination_js|safe}
removeElementClass('sharedviews_page_container', 'hidden');
{literal}}{/literal});
</script>
{/if}
<hr />
{/if}
......
......@@ -220,9 +220,6 @@ These list must take into account the sort option choosen in the block config (B
#And I follow "2" in the "div#sharedviews_pagination" "css_element"
And I jump to page "2" of the list "sharedviews_pagination"
And I should not see "Page userA_01" in the "ul#sharedviewlist" "css_element"
#And I follow "3" in the "div#sharedviews_pagination" "css_element"
And I jump to page "3" of the list "sharedviews_pagination"
And I should not see "Page userA_01" in the "ul#sharedviewlist" "css_element"
# Update the shared collection "Collection userA_06"
And I choose "Collections" in "Portfolio"
And I click on "Edit \"Collection userA_06\""
......@@ -254,11 +251,7 @@ These list must take into account the sort option choosen in the block config (B
And I select "Collection userA_03" from "group_view_submission_form_2_options"
And I press "Submit"
And I press "Yes"
And I log out
# Check the list of submitted pages/collections
Given I log in as "userA" with password "Kupuhipa1"
And I choose "My groups" in "Groups"
And I follow "Group Z"
And I should see "Page userA_03" in the "ul#allsubmissionlist" "css_element"
And I should see "Page userA_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection userA_03" in the "ul#allsubmissionlist" "css_element"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment