Skip to content

Instantly share code, notes, and snippets.

View marinaglancy's full-sized avatar

Marina Glancy marinaglancy

View GitHub Profile
@marinaglancy
marinaglancy / Moodle releases
Last active August 29, 2015 14:21
Moodle releases calendar
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["timeline","corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
@core @core_grades
Feature: Test all aggregation methods in one course
In order to review all aggregation methods
As an teacher
I need to be able to view a course with all aggregation methods
Background:
Given I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
Started at 22-04-2014, 02:14
...................................................................... 70
...................................................................... 140
...................................................................... 210
...................................................................... 280
...................................................................... 350
...................................................................... 420
...................................................................... 490
...................................................................... 560
...................................................................... 630
@marinaglancy
marinaglancy / mysql_win.txt
Created November 15, 2013 05:40
Gist description…
There were 11 failures:
1) core_phpunit_basic_testcase::test_lineendings
Make sure all project files are checked out with unix line endings.
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
#Warning: Strings contain different line endings!
a
(::) failed steps (::)
01. Link matching locator "'Choice 1'" not found.
In step `And I choose "Option 1" from "Choice 1" choice activity'. # behat_mod_choice::I_choose_option_from_activity()
From scenario `Publish anonymous results'. # /home/marina/repositories/oracle26/moodle/mod/choice/tests/behat/publish_results_anonymously.feature:26
Of feature `A teacher can choose whether to publish choice activity results anonymously or showing names'. # /home/marina/repositories/oracle26/moodle/mod/choice/tests/behat/publish_results_anonymously.feature
02. "(this entry is currently hidden)" text was not found in the page
In step `Then I should see "(this entry is currently hidden)"'. # behat_general::assert_page_contains_text()
From scenario `Approve and disapprove glossary entries'. # /home/marina/rep
Time: 6.12 hours, Memory: 366.00Mb
There was 1 failure:
1) core_statslib_testcase::test_statslib_get_start_from
None start time
Failed asserting that 2 is equal to 1 or is less than 1.
/home/marina/repositories/oracle26/moodle/lib/tests/statslib_test.php:344
/home/marina/repositories/oracle26/moodle/lib/phpunit/classes/advanced_testcase.php:80
@marinaglancy
marinaglancy / warning.txt
Created November 4, 2013 22:35
Warnings
( ! ) Warning: Unknown: GC cache entry '/var/lib/jenkins/git_repositories/moodle_ci_site/admin/tool/replace/settings.php' (dev=51793 ino=11092) was on gc-list for 22092 seconds in Unknown on line 0
( ! ) Warning: Unknown: GC cache entry '/var/lib/jenkins/git_repositories/moodle_ci_site/local/codechecker/settings.php' (dev=51793 ino=17053517) was on gc-list for 22092 seconds in Unknown on line 0
( ! ) Warning: Unknown: GC cache entry '/var/lib/jenkins/git_repositories/moodle_ci_site/admin/tool/profiling/settings.php' (dev=51793 ino=11085) was on gc-list for 22092 seconds in Unknown on line 0
( ! ) Warning: Unknown: GC cache entry '/var/lib/jenkins/git_repositories/moodle_ci_site/admin/tool/phpunit/settings.php' (dev=51793 ino=11080) was on gc-list for 22092 seconds in Unknown on line 0
( ! ) Warning: Unknown: GC cache entry '/var/lib/jenkins/git_repositories/moodle_ci_site/admin/tool/health/settings.php' (dev=51793 ino=11072) was on gc-list for 22092 seconds in Unknown on line 0
@marinaglancy
marinaglancy / testgenerator.php
Created October 24, 2013 02:49
Testing MDL-42400
<?php
include "config.php";
require_once($CFG->dirroot . '/lib/testing/classes/util.php');
$PAGE->set_context(context_system::instance());
$generator = testing_util::get_data_generator();
// Create course.
@marinaglancy
marinaglancy / testgenerator.php
Created October 22, 2013 12:38
Example script to generate data on the development site
<?php
//define('CLI_SCRIPT', true);
include "config.php";
require_once($CFG->dirroot . '/lib/testing/classes/util.php');
$PAGE->set_context(context_system::instance());
$generator = testing_util::get_data_generator();
// Create users.
@marinaglancy
marinaglancy / mygenerator_test.php
Last active December 26, 2015 05:19
Example of using generator in unittests
<?php
class my_test_generator_testcase extends advanced_testcase {
public function test_generator_methods() {
global $DB;
$this->resetAfterTest(true);
$category = $this->getDataGenerator()->create_category();
$course = $this->getDataGenerator()->create_course();
$user1 = $this->getDataGenerator()->create_user();