[moodle] / contrib / plugins / grade / report / stats / tabs.php Repository:

View of /contrib/plugins/grade/report/stats/tabs.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Mon Jun 16 01:36:20 2008 WST (17 months, 1 week ago) by dservos
Branch: MAIN
CONTRIB-496
First version of report/stats plug-in as part of the animated grade statistics report GSoC project.

Adds basic required functionality for a new text based grade report plug-in that displays several statistics such as mean, mode, highest grade, lowest grade, etc. Also added user options to control the look and how the statistics are calculated.

TODO:
# Add outcomes.
# Improve the look and readability.
# Add admin/teacher settings to override if a student can see a given statistic.
# Add help text for the settings page.
# More settings.
# Printable version.
# Add more documentation
# Export ability
# Clean up code a bit
<?php
    $row = $tabs = array();
    $tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
    $row[] = new tabobject('statsreport',
                           $CFG->wwwroot.'/grade/report/stats/index.php?id='.$courseid,
                           get_string('modulename', 'gradereport_stats'));
    
    if (has_capability('moodle/grade:manage',$tabcontext ) ||
        has_capability('moodle/grade:edit', $tabcontext) ||
        has_capability('gradereport/stats:view', $tabcontext)) {
        $row[] = new tabobject('preferences',
                               $CFG->wwwroot.'/grade/report/stats/preferences.php?id='.$courseid,
                               get_string('myreportpreferences', 'grades'));
    }

    $tabs[] = $row;
    echo '<div class="gradedisplay">';
    print_tabs($tabs, $currenttab);
    echo '</div>';
?>

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7