summaryrefslogtreecommitdiff
path: root/lab_migration.module
diff options
context:
space:
mode:
Diffstat (limited to 'lab_migration.module')
-rwxr-xr-xlab_migration.module32
1 files changed, 23 insertions, 9 deletions
diff --git a/lab_migration.module b/lab_migration.module
index fb03977..68d849f 100755
--- a/lab_migration.module
+++ b/lab_migration.module
@@ -341,14 +341,16 @@ function lab_migration_menu()
'type' => MENU_CALLBACK,
'file' => 'download.inc'
);
- /*$items['lab_migration/download/dependency'] = array(
- 'title' => 'Code Download',
- 'description' => 'Code Download',
- 'page callback' => 'lab_migration_download_dependency_file',
- 'access arguments' => array('lab migration download code'),
- 'type' => MENU_CALLBACK,
- 'file' => 'download.inc',
- );*/
+ $items['lab-migration/download/problem-statement'] = array(
+ 'title' => 'Download Problem Statement',
+ 'description' => 'Download Problem Statement',
+ 'page callback' => 'lab_migration_download_problem_statement',
+ 'access arguments' => array(
+ 'lab migration download code'
+ ),
+ 'type' => MENU_CALLBACK,
+ 'file' => 'download.inc'
+ );
$items['lab-migration/download/solution'] = array(
'title' => 'Code Download',
'description' => 'Code Download',
@@ -408,6 +410,18 @@ function lab_migration_menu()
),
'file' => 'lab_details.inc'
);
+ $items['lab-migration/experiments-list'] = array(
+ 'title' => 'Download Codes',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array(
+ 'lab_migration_experiments_list'
+ ),
+ 'access arguments' => array(
+ 'lab migration download code'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+ 'file' => 'experiments_list.inc'
+ );
/* LABS IN PROGRESS */
$items['lab-migration/labs-progress'] = array(
'title' => 'Labs in Progress',
@@ -715,7 +729,7 @@ function lab_migration_ajax()
/*************************** VALIDATION FUNCTIONS *****************************/
function lab_migration_check_valid_filename($file_name)
{
- if (!preg_match('/^[0-9a-zA-Z\.]+$/', $file_name))
+ if (!preg_match('/^[0-9a-zA-Z_\.]+$/', $file_name))
return FALSE;
else if (substr_count($file_name, ".") > 1)
return FALSE;