To get all the users who have spent time on a node.

like

Node 1 = John 0:14:40
Node 1 = Lisa 1:20:15
Node 1 = Jack 0:37:10
Node 1= Robert 0:43:30

Node 2= Simon 0:23:30
Node 2= Phil 0:18:20
Node 2= Mark 0:10:30
Node 2= Anna 1:50:30

Comments

manojbisht_drupal created an issue. See original summary.

manojbisht_drupal’s picture

Status: Active » Needs review
StatusFileSize
new1.83 KB

Hi,

Please find the attached patch for this issue.

piyuesh23’s picture

Status: Needs review » Needs work

@manoj, Good work. Couple of general issues.

  1. +++ b/src/Controller/timeSpentController.php
    @@ -131,6 +131,53 @@
    +        $header = array($this->t('Post'), $this->t('User'), $this->t('Time Spent'));
    

    Indentation fix.

  2. +++ b/src/Controller/timeSpentController.php
    @@ -131,6 +131,53 @@
    +    $query = $query->extend('Drupal\Core\Database\Query\PagerSelectExtender');
    

    We can add the use statement for this & make this more compact.

manojbisht_drupal’s picture

Status: Needs work » Needs review
StatusFileSize
new2 KB

Hi Piyuesh,

Please see the revised patch.

Thanks,
Manoj Bisht

piyuesh23’s picture

Status: Needs review » Fixed

Committed & pushed to 8.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.