You are here

function qformat_blackboard_6::check_dir_exists in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format/blackboard_6/format.php \qformat_blackboard_6::check_dir_exists()
2 calls to qformat_blackboard_6::check_dir_exists()
qformat_blackboard_6::check_and_create_import_dir in includes/moodle/question/format/blackboard_6/format.php
qformat_blackboard_6::copy_file_to_course in includes/moodle/question/format/blackboard_6/format.php

File

includes/moodle/question/format/blackboard_6/format.php, line 104

Class

qformat_blackboard_6

Code

function check_dir_exists($dir, $create = false) {
  global $CFG;
  $status = true;
  if (!is_dir($dir)) {
    if (!$create) {
      $status = false;
    }
    else {
      umask(00);
      $status = mkdir($dir, $CFG->directorypermissions);
    }
  }
  return $status;
}