Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #45 from noten-app/user-unique-ids
Browse files Browse the repository at this point in the history
πŸ› Fix non-year-specific loading of subjects
  • Loading branch information
CuzImBisonratte authored Nov 22, 2023
2 parents 0907bd4 + 8dc72a7 commit afecb82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions homework/add/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

// Get all subjects
$subjectlist = array();
if ($stmt = $con->prepare("SELECT name, color, id, last_used, average FROM " . $config["db"]["tables"]["subjects"] . " WHERE user_id = ?")) {
$stmt->bind_param("s", $_SESSION["user_id"]);
if ($stmt = $con->prepare("SELECT name, color, id, last_used, average FROM " . $config["db"]["tables"]["subjects"] . " WHERE user_id = ? AND year = ?")) {
$stmt->bind_param("ss", $_SESSION["user_id"], $_SESSION["setting_years"]);
$stmt->execute();
$stmt->bind_result($subject_name, $subject_color, $subject_id, $subject_last_used, $subject_grade_average);
while ($stmt->fetch()) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion homework/edit/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<script src="https://assets.noten-app.de/js/jquery/jquery-3.6.1.min.js"></script>
<script src="https://assets.noten-app.de/js/themes/themes.js"></script>
<script src="./type-switch.js"></script>
<script src="./edit-subject.js"></script>
<script src="./edit-homework.js"></script>
<?php if ($config["tracking"]["matomo"]["on"]) echo ($config["tracking"]["matomo"]["code"]); ?>
</body>

Expand Down

0 comments on commit afecb82

Please sign in to comment.