You are here

function _quiz_results_mr_get_hover in Quiz 7

Same name and namespace in other branches
  1. 8.4 quiz.admin.inc \_quiz_results_mr_get_hover()
  2. 6.4 quiz.admin.inc \_quiz_results_mr_get_hover()
  3. 7.4 quiz.admin.inc \_quiz_results_mr_get_hover()

Returns links to be placed on the quiz results browser.

The links will be made visible when the user hovers over them.

Parameters

$quiz: The quiz node

$rid: Result id

Return value

Html string with links.

1 call to _quiz_results_mr_get_hover()
quiz_results_manage_results_form in ./quiz.admin.inc
Form for searching after and manipulating results for a quiz

File

./quiz.admin.inc, line 2504
Administrator interface for Quiz module.

Code

function _quiz_results_mr_get_hover($quiz, $rid) {
  $to_return = array(
    l(t('view'), 'node/' . $quiz->nid . '/results/' . $rid),
  );
  if (user_access('delete any quiz results') || user_access('delete results for own quiz')) {
    $to_return[] = l(t('delete'), 'admin/quiz/reports/results/' . $quiz->nid, array(
      'query' => array(
        'del' => $rid,
      ),
      'attributes' => array(
        'class' => 'hover-del',
        'id' => $quiz->nid . '-' . $rid . '-del',
      ),
    ));
  }
  return implode(' | ', $to_return);
}