mangei / tissquickregistrationscript

TISS Quick Registration Script
MIT License
128 stars 48 forks source link

Issue with self.getExamDate Function in self.doExamCheck function #23

Open deroskarmodulo opened 2 years ago

deroskarmodulo commented 2 years ago

Multiple exams with same dateOfExam are all highlighted even though they have a different nameOfExam. Issue appears in Code the first time in the output of the self.doExamCheck function. It seems to just regard on the date, however, not on the label! I am not aware, if any issues at the registration process itself would appear.

At first sigth, in dateOfExam the examLabel variable is not really used, the output solely relys on the examDate, since in the self.getExamDate function.

Possible fix (at least if date and name are given and enabled):

    self.getExamDate = function (nameOfExam, dateOfExam) {
        return $(".groupWrapper .header_element").filter(function () {
            var examData = $(this).text().trim();
            return examData.match(nameOfExam + " " + dateOfExam);
        });
    };

Additionally, I would like to mention that the script works only if the language in TISS is set to German. It would be lovely to have that mentioned in the description anywhere.

Thanks for your time. Hope I could help to enhance your project!