Permalink
Browse files

MDL-34400 Libraries : maintained naming rule by removing stray mod_ f…

…unction and class prefixes from activity modules.

This rule @ http://docs.moodle.org/dev/Activity_modules still stands for now.
  • Loading branch information...
1 parent 4db0616 commit 6b8b0b2e683ff6712f376da9c8576121fdc763e4 @nebgor nebgor committed Jun 11, 2012
Showing with 16 additions and 16 deletions.
  1. +2 −2 mod/assign/lib.php
  2. +3 −3 mod/assignment/lib.php
  3. +1 −1 mod/data/lib.php
  4. +2 −2 mod/folder/lib.php
  5. +1 −1 mod/glossary/lib.php
  6. +2 −2 mod/page/lib.php
  7. +1 −1 mod/quiz/lib.php
  8. +2 −2 mod/resource/lib.php
  9. +2 −2 mod/url/lib.php
View
@@ -795,7 +795,7 @@ function assign_update_grades($assign, $userid=0, $nullifnone=true) {
* @param stdClass $context
* @return array
*/
-function mod_assign_get_file_areas($course, $cm, $context) {
+function assign_get_file_areas($course, $cm, $context) {
global $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
$areas = array();
@@ -837,7 +837,7 @@ function mod_assign_get_file_areas($course, $cm, $context) {
* @param string $filename
* @return object file_info instance or null if not found
*/
-function mod_assign_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
+function assign_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
global $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
View
@@ -1113,7 +1113,7 @@ function display_submission($offset=-1,$userid =-1, $display=true) {
}
}
- $submitform = new mod_assignment_grading_form( null, $mformdata );
+ $submitform = new assignment_grading_form( null, $mformdata );
if (!$display) {
$ret_data = new stdClass();
@@ -2422,7 +2422,7 @@ static function restore_one_submission($info, $restore, $assignment, $submission
} ////// End of the assignment_base class
-class mod_assignment_grading_form extends moodleform {
+class assignment_grading_form extends moodleform {
/** @var stores the advaned grading instance (if used in grading) */
private $advancegradinginstance;
@@ -3994,7 +3994,7 @@ function assignment_get_file_areas($course, $cm, $context) {
* @param string $filename
* @return file_info_stored file_info_stored instance or null if not found
*/
-function mod_assignment_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
+function assignment_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
global $CFG, $DB, $USER;
if ($context->contextlevel != CONTEXT_MODULE || $filearea != 'submission') {
View
@@ -2832,7 +2832,7 @@ function data_get_file_areas($course, $cm, $context) {
* @param string $filename
* @return file_info_stored file_info_stored instance or null if not found
*/
-function mod_data_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
+function data_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
global $CFG, $DB;
if ($context->contextlevel != CONTEXT_MODULE) {
View
@@ -363,7 +363,7 @@ function folder_export_contents($cm, $baseurl) {
* Register the ability to handle drag and drop file uploads
* @return array containing details of the files / types the mod can handle
*/
-function mod_folder_dndupload_register() {
+function folder_dndupload_register() {
return array('files' => array(
array('extension' => 'zip', 'message' => get_string('dnduploadmakefolder', 'mod_folder'))
));
@@ -374,7 +374,7 @@ function mod_folder_dndupload_register() {
* @param object $uploadinfo details of the file / content that has been uploaded
* @return int instance id of the newly created mod
*/
-function mod_folder_dndupload_handle($uploadinfo) {
+function folder_dndupload_handle($uploadinfo) {
global $DB, $USER;
// Gather the required info.
View
@@ -1620,7 +1620,7 @@ function glossary_get_file_areas($course, $cm, $context) {
* @param string $filename
* @return file_info_stored file_info_stored instance or null if not found
*/
-function mod_glossary_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
+function glossary_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {
global $CFG, $DB;
if ($context->contextlevel != CONTEXT_MODULE) {
View
@@ -477,7 +477,7 @@ function page_export_contents($cm, $baseurl) {
* Register the ability to handle drag and drop file uploads
* @return array containing details of the files / types the mod can handle
*/
-function mod_page_dndupload_register() {
+function page_dndupload_register() {
return array('types' => array(
array('identifier' => 'text/html', 'message' => get_string('createpage', 'page')),
array('identifier' => 'text', 'message' => get_string('createpage', 'page'))
@@ -489,7 +489,7 @@ function mod_page_dndupload_register() {
* @param object $uploadinfo details of the file / content that has been uploaded
* @return int instance id of the newly created mod
*/
-function mod_page_dndupload_handle($uploadinfo) {
+function page_dndupload_handle($uploadinfo) {
// Gather the required info.
$data = new stdClass();
$data->course = $uploadinfo->course->id;
View
@@ -1735,7 +1735,7 @@ function quiz_pluginfile($course, $cm, $context, $filearea, $args, $forcedownloa
* @param array $options additional options affecting the file serving
* @return bool false if file not found, does not return if found - justsend the file
*/
-function mod_quiz_question_pluginfile($course, $context, $component,
+function quiz_question_pluginfile($course, $context, $component,
$filearea, $qubaid, $slot, $args, $forcedownload, array $options=array()) {
global $CFG;
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
View
@@ -484,7 +484,7 @@ function resource_export_contents($cm, $baseurl) {
* Register the ability to handle drag and drop file uploads
* @return array containing details of the files / types the mod can handle
*/
-function mod_resource_dndupload_register() {
+function resource_dndupload_register() {
return array('files' => array(
array('extension' => '*', 'message' => get_string('dnduploadresource', 'mod_resource'))
));
@@ -495,7 +495,7 @@ function mod_resource_dndupload_register() {
* @param object $uploadinfo details of the file / content that has been uploaded
* @return int instance id of the newly created mod
*/
-function mod_resource_dndupload_handle($uploadinfo) {
+function resource_dndupload_handle($uploadinfo) {
// Gather the required info.
$data = new stdClass();
$data->course = $uploadinfo->course->id;
View
@@ -336,7 +336,7 @@ function url_export_contents($cm, $baseurl) {
* Register the ability to handle drag and drop file uploads
* @return array containing details of the files / types the mod can handle
*/
-function mod_url_dndupload_register() {
+function url_dndupload_register() {
return array('types' => array(
array('identifier' => 'url', 'message' => get_string('createurl', 'url'))
));
@@ -347,7 +347,7 @@ function mod_url_dndupload_register() {
* @param object $uploadinfo details of the file / content that has been uploaded
* @return int instance id of the newly created mod
*/
-function mod_url_dndupload_handle($uploadinfo) {
+function url_dndupload_handle($uploadinfo) {
// Gather all the required data.
$data = new stdClass();
$data->course = $uploadinfo->course->id;

0 comments on commit 6b8b0b2

Please sign in to comment.