Línea 279... |
Línea 279... |
279 |
$return = '<form id="ccn-star-rate" method="post" action="' . $CFG->wwwroot . '/blocks/cesa_course_rating/rate_course.php">
|
279 |
$return = '<form id="ccn-star-rate" method="post" action="' . $CFG->wwwroot . '/blocks/cesa_course_rating/rate_course.php">
|
280 |
<input name="id" type="hidden" value="' . $courseid . '" />
|
280 |
<input name="id" type="hidden" value="' . $courseid . '" />
|
281 |
<div class="ccn-star-rate-inner">';
|
281 |
<div class="ccn-star-rate-inner">';
|
282 |
for ($i = 1; $i <= 5; $i++) {
|
282 |
for ($i = 1; $i <= 5; $i++) {
|
283 |
$printCcnStar = str_repeat($ccnStar, $i);
|
283 |
$printCcnStar = str_repeat($ccnStar, $i);
|
- |
|
284 |
$label_text = $i == 1 ? ' estrella' : ' estrellas';
|
284 |
$return .= ' <label for="stars-' . $i . '">' .
|
285 |
$return .= ' <label for="stars-' . $i . '">' .
|
285 |
$i . $i > 1 ? ' estrellas' : ' estrella' .
|
286 |
$i . $label_text .
|
286 |
'<input required type="radio" id="stars-' . $i . '" name="rating" value="' . $i . '" />' .
|
287 |
'<input required type="radio" id="stars-' . $i . '" name="rating" value="' . $i . '" />' .
|
287 |
'</label>';
|
288 |
'</label>';
|
288 |
}
|
289 |
}
|
289 |
$return .= ' </div>
|
290 |
$return .= ' </div>
|
290 |
<button class="btn btn-primary" type="submit">' . get_string('rate_course', 'block_cesa_course_rating') . '</button>
|
291 |
<button class="btn btn-primary" type="submit">' . get_string('rate_course', 'block_cesa_course_rating') . '</button>
|