diff options
author | Sashi20 | 2024-08-05 11:30:29 +0530 |
---|---|---|
committer | GitHub | 2024-08-05 11:30:29 +0530 |
commit | 8fc5ee962cb8a29f458b354e1ca9676b02ff5fef (patch) | |
tree | ef9b2342a27630cedbded12008cc65fef49d1268 /lab_migration.module | |
parent | a2dc9e540c3392163862b4fd6e7a120b3d2e54b0 (diff) | |
parent | 3e4125b2568cdc8467e0f949560986ae7e722990 (diff) | |
download | cfd_lab_migration-master.tar.gz cfd_lab_migration-master.tar.bz2 cfd_lab_migration-master.zip |
Display list of experiments from the completed labs page, add field in proposal form for problem statement
Diffstat (limited to 'lab_migration.module')
-rwxr-xr-x | lab_migration.module | 32 |
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; |