Commit de811c0c authored by David Mudrak's avatar David Mudrak
Browse files

Adding locallib.php to store internal functions

parent 897e902b
// This file is part of Moodle -
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <>.
* Library of internal functions for module workshop
* All the workshop specific functions, needed to implement the module
* logic, should go to here.
* @package mod-workshop
* @copyright 2009 David Mudrak <>
* @license GNU GPL v3 or later
defined('MOODLE_INTERNAL') || die();
* Return the user's submission record in the given workshop
* Example submissions are not returned. This is intended to return a submission for given
* student.
* @param int $workshopid Workshop id
* @param int $userid Owner id
* @return mixed A fieldset object containing the first matching record or false if not found
function workshop_get_user_submission($workshopid, $userid) {
global $DB;
return $DB->get_record('workshop_submissions', array('workshopid' => $workshopid, 'userid' => $userid, 'example' => 0));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment