Skip to content

Instantly share code, notes, and snippets.

View samhemelryk's full-sized avatar

Sam Hemelryk samhemelryk

  • Totara Learning Solutions
  • Wellington, New Zealand
View GitHub Profile
Firefox + PgSQL + Linux - 3 fails
01. Link matching locator "You are subscribed to this discussion. Click to unsubscribe." in the "Test post subject one" "table_row"" not found.
In step `Then "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row"'. # behat_general::should_exist_in_the()
From scenario `An optional forum prompts a user to subscribe to a discussion when posting unless they have already chosen not to subscribe'. # /var/www/integration/mod/forum/tests/behat/discussion_subscriptions.feature:201
Of feature `A user can control their own subscription preferences for a discussion'. # /var/www/integration/mod/forum/tests/behat/discussion_subscriptions.feature
02. Link matching locator "You are subscribed to this discussion. Click to unsubscribe." in the "Test post subject one" "table_row"" not found.
In step `Then "You are subscribed to this discussion. Click
Chrome + PgSQL + Linux
Noting: Chrome was being run remotely, everything else was local
01. Link matching locator "You are subscribed to this discussion. Click to unsubscribe." in the "Test post subject one" "table_row"" not found.
In step `Then "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row"'. # behat_general::should_exist_in_the()
From scenario `An optional forum prompts a user to subscribe to a discussion when posting unless they have already chosen not to subscribe'. # /var/www/integration/mod/forum/tests/behat/discussion_subscriptions.feature:201
Of feature `A user can control their own subscription preferences for a discussion'. # /var/www/integration/mod/forum/tests/behat/discussion_subscriptions.feature
02. Link matching locator "You are subscribed to this discussion. Click to unsubscribe." in the "Test post subject one" "table_row"" not found.
In st
@samhemelryk
samhemelryk / pre-commit
Last active May 27, 2021 05:41
A git pre-commit hook example.
#!/bin/bash
#
# This pre-commit hook checks that you havn't left and DONOTCOMMIT tokens in
# your code when you go to commit.
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
#
# This is provided just as an example of how to use a pre-commit hook to
# catch nasties in your code.
@samhemelryk
samhemelryk / git-moodle.py
Last active January 4, 2016 15:29
This script pulls all of the branches associated with an issue on tracker.moodle.org
#! /usr/bin/python
"""
This script gets the branches used on a tracker.moodle.org issue and uses them to create/merge and stuff like that.
git moodle integration-pull MDL-43581
- Gets the PULL branches from a tracker.moodle.org issue and merges them to the local upstream
branch equivilants automatically fixing any shifter or less conflicts.
I use this during integration.
git moodle ipull 43581
@samhemelryk
samhemelryk / gist:7588922
Created November 21, 2013 20:22
Force the courses branch in the navigation to populate itself and to always be shown expanded.
diff --git a/lib/navigationlib.php b/lib/navigationlib.php
index d1c873f..452d956 100644
--- a/lib/navigationlib.php
+++ b/lib/navigationlib.php
@@ -1137,6 +1137,12 @@ class global_navigation extends navigation_node {
$canviewcourseprofile = true;
+ // Tell the navigation to always load all courses.
+ // Default behaviour is load the courses by AJAX, we want them there from word go.