This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
// Place this script in /<moodle-root-path>/course/ directory and run it | |
// * To delete one specific course with id: | |
// ~# php bulk_delete.php <course_id> | |
// | |
// * To delete all courses in the system: | |
// ~# php bulk_delete.php | |
// | |
// Tested Moodle version: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ValueError: The file 'themes/ourtheme/images/bg.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x38a18d0>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
// Stick the #nav to the top of the window | |
var nav = $('#nav'); | |
var navHomeY = nav.offset().top; | |
var isFixed = false; | |
var $w = $(window); | |
$w.scroll(function() { | |
var scrollTop = $w.scrollTop(); | |
var shouldBeFixed = scrollTop > navHomeY; | |
if (shouldBeFixed && !isFixed) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://opengraph.org/schema/'> <head><meta property='og:title' content='Update from {course_title}'/><meta property='fb:page_id' content='43929265776' /> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <title>Update from {course_title}</title> </head> <body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' offset='0' style='margin: 0;padding: 0;background-color: #ffffff;'> <center> <table align='center' border='0' cellpadding='0' cellspacing='0' height='100%' width='100%' id='bodyTable' style='border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0;padding: 0;background-color: #ffffff;height: 100% !important;width: 100% !important;'> <tr> <td align='center' valign='top' id='bodyCell' st |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{course_title} | |
{{message_body}} | |
---- | |
Copyright 2013 edX, All rights reserved. | |
---- | |
Connect with edX: | |
Facebook (http://facebook.com/edxonline) | |
Twitter (http://twitter.com/edxonline) | |
Google+ (https://plus.google.com/108235383044095082735) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/php | |
<?php | |
define('CLI_SCRIPT', true); | |
// Require both the backup and restore libs | |
require_once('../config.php'); | |
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); | |
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php'); | |
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php'); | |
require_once($CFG->dirroot . '/backup/util/ui/import_extensions.php'); | |
require_once($CFG->dirroot . '/course/lib.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Phil Dufault (2009) | |
# bumped to v1 (2011) | |
# [email protected] | |
VERSION="1.0.2" | |
log="$PWD/mysql_error_log.txt" | |
mysqlCmd="mysql" | |
echo "MySQL fragmentation finder (and fixer) v$VERSION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To change this template, choose Tools | Templates | |
# and open the template in the editor. | |
from sqlalchemy import * | |
from sqlalchemy.orm import * | |
import os | |
import datetime | |
class PsDB(object): | |
engine = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from sqlalchemy import * | |
from sqlalchemy.sql import select | |
from ps_db_utils import * | |
import csv | |
import os | |
import shutil | |
from datetime import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/php | |
<?php | |
echo "\n\n===================== START =====================\n\n"; | |
echo "\n>> Connecting to the Oracle database...\n"; | |
$OracleListener = "my.oracle.com:1521/PSPRODDB"; | |
$OracleUsername = "PS"; | |
$OraclePassword = "MyOraclePasswd"; | |
$conn = oci_connect($OracleUsername, $OraclePassword, $OracleListener); | |
if (!$conn) { |