Best Answer

Remove Expiration Date from Courses


Can any provide assistance with CSS code to remove the “Expiration Date” column from Courses, within Activities? During data migration this field was populated with the end enrollment date in our past LMS. Being a new LMS, users are confused by this column and think the course is expired and needs to be renewed.

icon

Best answer by gstager 16 May 2022, 14:48

View original

4 replies

Userlevel 7
Badge +5

Hey Keith -

Give this a shot. I think it is what you are referring to.

/** Remove the Expiration Date column from Courses Table **/

#course-management-grid_c4 {
display: none;
}

Now - to be fair - I don’t have any data populating this table yet so please test around and make sure it doesn’t affect anything else.

Hi Greg,

The code only removed the column header. I also need to remove the “Expiration Date” column of data from the data grid. 

Thanks for your response.

Userlevel 7
Badge +5

@Keith Balaberda - OK - Let’s try this adjustment.

I went ahead and enrolled myself in a couple courses to get an actual table to work with.

I decided to remove the User Status column for my test as it would be more visible.

It appears the header row is zero indexed which is why expiration date is c4

The table itself will not be zero indexed which means you’ll need :nth-child(5)

Here is my before and after.

Before CSS
After CSS

So you can see that it did pull out the data as well.

Here is the code

/** Remove column of data from table **/

#course-management-grid_c2 {
display: none;
}

#course-management-grid tbody td:nth-child(3) {
display: none;
}

For expiration date - just change c2 to c4 and :nth-child(3) to :nth-child(5)

Hopefully this does the trick.

 

Thanks for you help. This hid the column perfectly.

/** Remove the Expiration Date column from Courses Table **/

#course-management-grid_c4 {

    display: none;

}

/** Remove column of data from table **/

#course-management-grid_c4 {

    display: none;

}

#course-management-grid tbody td:nth-child(5) {

    display: none;

}

Reply