<commit_before><?PHP // $Id$

/// index.php for attendance module
/// This page lists all the instances of NEWMODULE in a particular course
/// Replace NEWMODULE with the name of your module

    require_once("../../config.php");
    require_once("lib.php");

    require_variable($id);   // course

    if (! $course = get_record("course", "id", $id)) {
        error("Course ID is incorrect");
    }

    require_login($course->id);

    add_to_log($course->id, "attendance", "viewall", "index.php?id=$course->id", "");


/// Get all required strings

    $strattendances = get_string("modulenameplural", "attendance");
    $strattendance  = get_string("modulename", "attendance");


/// Print the header

    if ($course->category) {
        $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
    }

    print_header("$course->shortname: $strNEWMODULEs", "$course->fullname", "$navigation $strattendances", "", "", true, "", navmenu($course));

/// Get all the appropriate data

    if (! $attendances = get_all_instances_in_course("attendance", $course)) {
        notice("There are no attendances", "../../course/view.php?id=$course->id");
        die;
    }

/// Print the list of instances (your module will probably extend this)

    $timenow = time();
    $strname  = get_string("name");
    $strweek  = get_string("week");
    $strtopic  = get_string("topic");

    if ($course->format == "weeks") {
        $table->head  = array ($strweek, $strname);
        $table->align = array ("CENTER", "LEFT");
    } else if ($course->format == "topics") {<commit_msg>fixed bug #1380 - string in index.php<commit_after><?PHP // $Id$

/// index.php for attendance module
/// This page lists all the instances of NEWMODULE in a particular course
/// Replace NEWMODULE with the name of your module

    require_once("../../config.php");
    require_once("lib.php");

    require_variable($id);   // course

    if (! $course = get_record("course", "id", $id)) {
        error("Course ID is incorrect");
    }

    require_login($course->id);

    add_to_log($course->id, "attendance", "viewall", "index.php?id=$course->id", "");


/// Get all required strings

    $strattendances = get_string("modulenameplural", "attendance");
    $strattendance  = get_string("modulename", "attendance");


/// Print the header

    if ($course->category) {
        $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
    }

    print_header("$course->shortname: $strattendance", "$course->fullname", "$navigation $strattendances", "", "", true, "", navmenu($course));

/// Get all the appropriate data

    if (! $attendances = get_all_instances_in_course("attendance", $course)) {
        notice("There are no attendances", "../../course/view.php?id=$course->id");
        die;
    }

/// Print the list of instances (your module will probably extend this)

    $timenow = time();
    $strname  = get_string("name");
    $strweek  = get_string("week");
    $strtopic  = get_string("topic");

    if ($course->format == "weeks") {
        $table->head  = array ($strweek, $strname);
        $table->align = array ("CENTER", "LEFT");
    } else if ($course->format == "topics") {
{'fraction_non_alphanumeric': 0.1901972872996301, 'fraction_numerical': 0.0012330456226880395, 'mean_word_length': 3.264126149802891, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 35, 'https://': 0, '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': '5076171', 'n_tokens_mistral': 1012, 'n_tokens_neox': 999, 'n_words': 241}