<commit_before>import { requester } from '../../utils/requester.js';
import { templates } from '../../utils/templates.js';
import { isTeacher } from '../../utils/helper.js';

export function GradesController() {
    const subjectsUrl = 'https://elsyser.herokuapp.com/api/subjects/';

    if (!isTeacher(localStorage.getItem('elsyser-token'))) {
        requester.getJSON(subjectsUrl)
            .then(subjects => {
                return subjects;
            }).then(subjects => {
                $('#content').html('');
                subjects.forEach(el => {
                    visualizeGradesForSubject(el);
                });
            });<commit_msg>Added classes URL for further work<commit_after>import { requester } from '../../utils/requester.js';
import { templates } from '../../utils/templates.js';
import { isTeacher } from '../../utils/helper.js';

export function GradesController() {
    const subjectsUrl = 'https://elsyser.herokuapp.com/api/subjects/';
    const classesUrl = 'https://elsyser.herokuapp.com/api/classes/${number}';

    // TODO: Use URL from API to visualize classes
    
    if (!isTeacher(localStorage.getItem('elsyser-token'))) {
        requester.getJSON(subjectsUrl)
            .then(subjects => {
                return subjects;
            }).then(subjects => {
                $('#content').html('');
                subjects.forEach(el => {
                    visualizeGradesForSubject(el);
                });
            });
{'fraction_non_alphanumeric': 0.16227180527383367, 'fraction_numerical': 0.0, 'mean_word_length': 2.076923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4733271', 'n_tokens_mistral': 411, 'n_tokens_neox': 406, 'n_words': 72}