MDL-34400 Libraries : maintained naming rule by removing stray mod_ function and class prefixes from activity modules.

This rule @ http://docs.moodle.org/dev/Activity_modules still stands for now.
This commit is contained in:
Aparup Banerjee 2012-06-11 13:34:47 +08:00
parent 4db061680e
commit 6b8b0b2e68
9 changed files with 16 additions and 16 deletions

View File

@ -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 File

@ -1113,7 +1113,7 @@ class assignment_base {
}
}
$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 @@ class assignment_base {
} ////// 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 File

@ -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 File

@ -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 File

@ -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 File

@ -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 File

@ -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 File

@ -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 File

@ -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;