-
Notifications
You must be signed in to change notification settings - Fork 0
/
self_assessment.module
56 lines (47 loc) · 1.46 KB
/
self_assessment.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Implements hook_help().
*/
function self_assessment_help($path, $arg) {
return SelfAssessmentHelp::index($path, $arg);
}
/**
* Implements hook_menu().
*/
function self_assessment_menu() {
$items = [];
$items['admin/quiz/self_assessment'] = array(
'title' => 'Self Assessment',
'description' => 'Configure Self Assessments',
'page callback' => 'SelfAssessmentAdminOverview::index',
'access arguments' => array('administer quiz configuration'),
'type' => MENU_NORMAL_ITEM,
);
$items['admin/quiz/self_assessment/import'] = array(
'title' => 'Import',
'description' => 'Import new Self Assessments from XML',
'page callback' => 'drupal_get_form',
'page arguments' => ['self_assessment_admin_import_form'],
'access arguments' => array('administer quiz configuration'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
/**
* Implements hook_admin_paths().
*/
function self_assessment_admin_paths() {
return array(
'node/*/self_assessment' => TRUE,
'node/*/self_assessment/*' => TRUE,
);
}
function self_assessment_admin_import_form($form, &$form_state) {
return SelfAssessmentAdminImport::form($form, $form_state);
}
function self_assessment_admin_import_form_submit($form, &$form_state) {
return SelfAssessmentAdminImport::submit($form, $form_state);
}
function self_assessment_admin_import_form_validate($form, &$form_state) {
return SelfAssessmentAdminImport::validate($form, $form_state);
}