function selectCourseForUser(courseId, userId, isSuperuser) {
  const queryText = `
    SELECT * FROM courses WHERE id = $1 AND (
      id IN (
        SELECT courseid FROM attends
        INNER JOIN users ON users.userid = attends.userid 
        WHERE users.userid = $2 
        AND isactive AND isemailverified 
        AND (islecturer OR ismodulecoordinator OR isstudent)
      ) 
      OR $3
    )
  `;
  const params = [courseId, userId, isSuperuser];
  return databaseQuery(queryText, params);
}
/**
 * Returns data of a single course with the relevant courses.Id
 *
 * @param {number} courseId Id of a course referring to Table.courses.id
 * @param {string} userId
 * @param {boolean} isSuperuser
 */
Returns data of a single course with the relevant courses.Id
@param {number} courseId Id of a course referring to Table.courses.id
@param {string} userId
@param {boolean} isSuperuser
Returns data of a single course with the relevant courses . Id @param { number } courseId Id of a course referring to Table . courses . id @param { string } userId @param { boolean } isSuperuser
function selectCourseForUser(courseId, userId, isSuperuser) {
  const queryText = `
    SELECT * FROM courses WHERE id = $1 AND (
      id IN (
        SELECT courseid FROM attends
        INNER JOIN users ON users.userid = attends.userid 
        WHERE users.userid = $2 
        AND isactive AND isemailverified 
        AND (islecturer OR ismodulecoordinator OR isstudent)
      ) 
      OR $3
    )
  `;
  const params = [courseId, userId, isSuperuser];
  return databaseQuery(queryText, params);
}
function selectCourseForUser ( courseId , userId , isSuperuser ) { const queryText = ` ` ; const params = [ courseId , userId , isSuperuser ] ; return databaseQuery ( queryText , params ) ; }
Returns data of a single course with the relevant courses.Id
 @param {number} courseId Id of a course referring to Table.courses.id
 @param {string} userId
 @param {boolean} isSuperuser
Returns data of a single course with the relevant courses . Id @param { number } courseId Id of a course referring to Table . courses . id @param { string } userId @param { boolean } isSuperuser