Showing the timespent by a learner on Opigno

eva
Forums
Hi, I wanted to share my experience with the community, it is related to a module that shows the time spent per user and per node. I found a module that can gives time statistics to learners : have a tab on the “user profile” see the time they spent download these statistics in a XLS file RequirementsTimeSpent module ( https://www.drupal.org/project/time_spent )View Data Export (https://www.drupal.org/project/views_data_export)  Main steps Download and enable the “Time Spent” moduleDownload and enable the “View Data Export” moduleCreate a new view : Structure => ViewTick “page” (and “block” too if you want)Add these relationships to your view: Timespent: Node IDTimespent: User ID Add these fields to your view Timespent: Time spent length (Time spent length)(Timespent node) Content: Title (Title)  => don’t forget to Link this field to the original piece of content(Timespent user) User: Name (Name) Add these Filter Criteria (Timespent user) User: Current (Yes)(Timespent user) User: Active (Yes) Select the Format of your view =>  Table So what we have here is a view that will show :The time spent length of each content related to the active current user We will add now a tab on the user profile: Go on Page Settings of your viewAdd a path (I chose user/%/timespent)Select the menu item entry: Type: menu tabMenu: Navigation Configure Access:PermissionView published content Making this content downloadable Click on “Add” and choose “Data export”Select XLS file as a Format  Save your view and go to the user account  screenshot There are a lot of different ways to use this module, so feel free to share your experience :) The TimeSpent module can also show the total time spent on your Opigno website Big up to the Opigno community!
eva

Configuring the XLS export

Forgot to give details about the XLS export: 1. create a Global Text area in the footer of your page 2. type your html text:
ex: a href = "htt p ://myopigno.com/?q=export-my-timespent">Download my Timespent sheet
DJustice

Showing the timespent by a learner on Opigno

Exactly what I need to satisfy my state hourly use requirements! Having trouble though- Cannot find where to do this: Making this content downloadable Click on “Add” and choose “Data export” Select XLS file as a Format Regards! Dj
eva

Hi Dj,

Hi Dj, This screenshot would help you : https://anonfiles.com/file/e684e7defe7411146ad1934c9ed23f69 When you are creating your view, click on "add" (1)to add another "Display" (like Page, block..) and select "Data Export" (2) then in your new display you'll have to select "XLS" in Format settings (3)
axel

Hi Eva

Hi Eva Thanks for sharing your experience ! That's very interesting. Best regards
markusd1984

Just tried it and it worked.

Just tried it and it worked. FYI - The **"Link this field to the original piece of content"** option is inside the field configuration of Content:Title For the download button to appear, once you added the "Data export" and go to Data export settings > under "Attach to" select Page. Another tip is to also click on Format > Settings and select "Provide as file" so the download is as .xls