@ -6723,7 +6723,7 @@ class Exercise
$exerciseAttempts = $this->selectAttempts();
if ($exerciseAttempts > 0) {
$attemptCount = Event::get_attempt_count_not_finished(
$attemptCount = Event::get_attempt_count(
api_get_user_id(),
$this->getId(),
$lpId,
@ -6733,7 +6733,7 @@ class Exercise
if ($attemptCount >= $exerciseAttempts) {
$message = sprintf(
get_lang('Reachedmax. 20 characters, e.g. <i>INNOV21</i>Attempts'),
get_lang('You cannot take test <b>%s</b> because you have already reached the maximum of %s attempts.'),
$this->name,
$exerciseAttempts
);
@ -262,6 +262,7 @@ class Database
}
/**
* Wrapper to executes a query on the defined database handler.
* @throws Exception
*/
public static function query(string $query): ?\Doctrine\DBAL\Result
@ -346,6 +347,7 @@ class Database
* Wrapper executing an SQL update query based on the given attributes array
* @param string $tableName use Database::get_main_table
* @param array $attributes Values to updates
* Example: $params['name'] = 'Julio'; $params['lastname'] = 'Montoya';
@ -19,7 +19,14 @@ class TrackEDownloadsRepository extends ServiceEntityRepository
parent::__construct($registry, TrackEDownloads::class);
public function saveDownload(int $userId, int $resourceLinkId, string $documentUrl)
* Save record of a resource being downloaded in track_e_downloads
* @param int $userId
* @param int $resourceLinkId
* @param string $documentUrl
* @return int
public function saveDownload(int $userId, int $resourceLinkId, string $documentUrl): int
{
$download = new TrackEDownloads();
$download->setDownDocPath($documentUrl);
@ -36,19 +36,19 @@ module.exports = {
gradient: colorWithOpacity("--color-tertiary-gradient"),
},
gray: {
5: "#ccc",
10: "#bbb",
15: "#aaa",
20: "#999",
25: "#888",
30: "#777",
50: "#555",
90: "#444",
5: "#fcfcfc",
10: "#fafafa",
15: "#f7f8f9",
20: "#edf0f2",
25: "#e4e9ed",
30: "#e0e0e0",
50: "#a2a6b0",
90: "#333333",
support: {
1: "rgba(46, 117, 163, 0.08)",
1: "#eff4f8",
2: "#f5f8fa",
3: "rgba(46, 117, 163, 0.5)",
3: "#97bad1",
4: "#244d67",
5: "#e06410",
6: "#faf7f5",