Skip to content

Commit

Permalink
Merge branch 'driprelease_1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Oct 24, 2023
2 parents c58feaa + c0ed738 commit 0601911
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions driprelease_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public function definition() {
$group[] = $mform->createElement('text', 'sessionlength', get_string('sessionlength', 'tool_driprelease'),
['value' => $driprelease->sessionlength, 'size' => 3] );

$mform->addGroup($group, 'sessiongroup', get_string('sessionlength', 'tool_driprelease') . '  ', '', false, []);
$mform->addRule('sessiongroup', null, 'required', null, 'client');
$mform->setType('sessionlength', PARAM_INT);
$mform->addElement('text', 'sessionlength', get_string('sessionlength', 'tool_driprelease'),
['value' => $driprelease->sessionlength, 'size' => 2]);
$mform->addRule('sessionlength', null, 'required', null, 'client');

$mform->setType('sessiongroup', PARAM_RAW);
$mform->addHelpButton('sessiongroup', 'session', 'tool_driprelease');
$mform->setType('sessionlength', PARAM_RAW);
$mform->addHelpButton('sessionlength', 'session', 'tool_driprelease');

$mform->addElement('text', 'activitiespersession', get_string('activitiespersession', 'tool_driprelease'), ['size' => '3']);
$mform->addRule('activitiespersession', null, 'required', null, 'client');
Expand Down Expand Up @@ -164,7 +164,7 @@ public function validation($fromform, $tabledata) {
$modulecount = count($this->modules);
$errors = [];
$activitiespersession = $fromform['activitiespersession'];
$sessionlength = $fromform['sessiongroup']['sessionlength'];
$sessionlength = $fromform['sessionlength'];
$duration = round(($fromform['schedulefinish'] - $fromform['schedulestart']) / DAYSECS);

if ($duration < 1) {
Expand Down
1 change: 1 addition & 0 deletions tests/behat/basic_test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Feature: Drip release modifies activity availability

And I click on "Edit settings" "link" in the "Quiz1" activity
And I expand all fieldsets
And I pause
And I set the field "Completion tracking" to "Show activity as complete when conditions are met"
And I set the field "completionusegrade" to "1"
And I press "Save and return to course"
Expand Down

0 comments on commit 0601911

Please sign in to comment.