adding some strings
[moodle-linuxchix.git] / lib / simpletest / testgradelib.php
blobeae24b277dd264ad717d82c8417151c549e7ecf3
1 <?php // $Id$
3 ///////////////////////////////////////////////////////////////////////////
4 // //
5 // NOTICE OF COPYRIGHT //
6 // //
7 // Moodle - Modular Object-Oriented Dynamic Learning Environment //
8 // http://moodle.org //
9 // //
10 // Copyright (C) 1999-2004 Martin Dougiamas http://dougiamas.com //
11 // //
12 // This program is free software; you can redistribute it and/or modify //
13 // it under the terms of the GNU General Public License as published by //
14 // the Free Software Foundation; either version 2 of the License, or //
15 // (at your option) any later version. //
16 // //
17 // This program is distributed in the hope that it will be useful, //
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20 // GNU General Public License for more details: //
21 // //
22 // http://www.gnu.org/copyleft/gpl.html //
23 // //
24 ///////////////////////////////////////////////////////////////////////////
26 /**
27 * Unit tests for (some of) ../gradelib.php.
29 * @author nicolas@moodle.com
30 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
31 * @package moodlecore
34 if (!defined('MOODLE_INTERNAL')) {
35 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
38 require_once($CFG->libdir.'/simpletest/fixtures/gradetest.php');
40 class gradelib_test extends grade_test {
41 function test_grade_is_locked() {
42 $grade_item = $this->grade_items[0];
43 $this->assertFalse(grade_is_locked($grade_item->courseid, $grade_item->itemtype, $grade_item->itemmodule, $grade_item->iteminstance, $grade_item->itemnumber));
44 $grade_item = $this->grade_items[6];
45 $this->assertTrue(grade_is_locked($grade_item->courseid, $grade_item->itemtype, $grade_item->itemmodule, $grade_item->iteminstance, $grade_item->itemnumber));