async function createLecturerReview(userId, solutionId, isSuperuser) {
  if (isSuperuser || await hasLecturerReviewRightsForSolutionId(solutionId, userId)) {
    const queryText = `
    INSERT INTO reviews(solutionid, userid, islecturerreview, isvisible)
    VALUES($1, $2, true, false) RETURNING id
    `;
    const params = [solutionId, userId];
    return await databaseQuery(queryText, params);
  }
  return null;
}
/**
 * creates a new LecturerReview for a given solutin if at least one of the following
 * conditions applies:
 *    - is Lecturer for the corresponding course of the solution
 *    - is Module Coordinator for the corresponding course of the solution
 *    - is Superuser
 *
 * @param {string} userId the userId of the reviewer
 * @param {string} solutionId the solutionId for which a LecturerReview should be created
 * @param {boolean} isSuperuser whether the reviewer is a superuser
 * @returns {string} the reviewId for the created LecturerReview, null if user not authorised
 */
creates a new LecturerReview for a given solutin if at least one of the following
conditions applies:
- is Lecturer for the corresponding course of the solution
- is Module Coordinator for the corresponding course of the solution
- is Superuser

@param {string} userId the userId of the reviewer
@param {string} solutionId the solutionId for which a LecturerReview should be created
@param {boolean} isSuperuser whether the reviewer is a superuser
@returns {string} the reviewId for the created LecturerReview, null if user not authorised
creates a new LecturerReview for a given solutin if at least one of the following conditions applies : - is Lecturer for the corresponding course of the solution - is Module Coordinator for the corresponding course of the solution - is Superuser @param { string } userId the userId of the reviewer @param { string } solutionId the solutionId for which a LecturerReview should be created @param { boolean } isSuperuser whether the reviewer is a superuser @returns { string } the reviewId for the created LecturerReview null if user not authorised
async function createLecturerReview(userId, solutionId, isSuperuser) {
  if (isSuperuser || await hasLecturerReviewRightsForSolutionId(solutionId, userId)) {
    const queryText = `
    INSERT INTO reviews(solutionid, userid, islecturerreview, isvisible)
    VALUES($1, $2, true, false) RETURNING id
    `;
    const params = [solutionId, userId];
    return await databaseQuery(queryText, params);
  }
  return null;
}
async function createLecturerReview ( userId , solutionId , isSuperuser ) { if ( isSuperuser || await hasLecturerReviewRightsForSolutionId ( solutionId , userId ) ) { const queryText = ` ` ; const params = [ solutionId , userId ] ; return await databaseQuery ( queryText , params ) ; } return null ; }
creates a new LecturerReview for a given solutin if at least one of the following
 conditions applies:
    - is Lecturer for the corresponding course of the solution
    - is Module Coordinator for the corresponding course of the solution
    - is Superuser
creates a new LecturerReview for a given solutin if at least one of the following conditions applies : - is Lecturer for the corresponding course of the solution - is Module Coordinator for the corresponding course of the solution - is Superuser