* Return true if the documentpath have visibility=1 as item_property
* Return true if the documentpath have visibility=1 as item_property (you should use the is_visible_by_id)
*
* @param string $document_path the relative complete path of the document
* @param array $course the _course array info of the document's course
@ -1079,6 +1079,13 @@ class DocumentManager {
$session_id = intval($session_id);
$condition = "AND id_session = $session_id";
// The " d.filetype='file' " let the user see a file even if the folder is hidden see #2198
//When using hotpotatoes files, new files are generated in the hotpotatoe folder, if user_id=1 does the exam a new html file will be generated: hotpotatoe.html.(user_id).t.html
//so we remove that string in order to find correctly the origin file
//improved protection of documents viewable directly through the url: incorporates the same protections of the course at the url of documents: access allowed for the whole world Open, access allowed for users registered on the platform Private access, document accessible only to course members (see the Users list), Completely closed; the document is only accessible to the course admin and teaching assistants.