turnitin / moodle-mod_turnitintooltwo

Turnitin Direct plugin (version 2) for Moodle
http://www.turnitin.com
32 stars 63 forks source link

Summary appearing twice on view page in Moodle 4.0+ #699

Open bwalkerl opened 8 months ago

bwalkerl commented 8 months ago

Moodle 4.0 added new activity headers that are by default turned on in most themes. The activity headers include a "description" section, which for mod_turnitintooltwo uses the summary. This summary is already shown in mod_turnitintooltwo on the view page in the submission inbox, which makes up part of the main page.

For short summaries this is fine, but it becomes very noticeable for larger ones or those with custom styling as in the following example:

Screenshot from 2023-11-03 10-10-30

As a rough approach this can be hidden by adding the following code to view.php or a function called there, but having the description here does have other advantages so it may be better to take a different approach.

$PAGE->activityheader->set_attrs([
    "description" => '',
]);